GeezerVison is showing github.com — :pushpin: lower script version · nullstack/nullstack@013d4e4
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: scripts/index.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,8 +9,6 @@ const customConfig = path.resolve(process.cwd(), './webpack.config.js'); |
9 | 9 | const config = existsSync(customConfig) ? require(customConfig) : require('../webpack.config'); |
10 | 10 | const dotenv = require('dotenv') |
11 | 11 |
|
12 | | -const buildModes = ['ssg', 'spa', 'ssr'] |
13 | | - |
14 | 12 | function getConfig(options) { |
15 | 13 | return config.map((env) => env(null, options)) |
16 | 14 | } |
@@ -36,7 +34,9 @@ async function start({ input, port, env, mode = 'ssr', hot }) { |
36 | 34 | envPath += `.${process.env.NULLSTACK_ENVIRONMENT_NAME}` |
37 | 35 | } |
38 | 36 | dotenv.config({ path: envPath }) |
39 | | - port ??= process.env['NULLSTACK_SERVER_PORT'] || process.env['PORT'] || 3000 |
| 37 | + if (!port) { |
| 38 | + port = process.env['NULLSTACK_SERVER_PORT'] || process.env['PORT'] || 3000 |
| 39 | + } |
40 | 40 | process.env['NULLSTACK_ENVIRONMENT_MODE'] = mode |
41 | 41 | console.log(` 🚀️ Starting your application in ${environment} mode...`); |
42 | 42 | const WebpackDevServer = require('webpack-dev-server'); |
|