diff --git a/config/nodemon/dev.json b/config/nodemon/dev.json index 34c426fa0..f43c7d1b9 100644 --- a/config/nodemon/dev.json +++ b/config/nodemon/dev.json @@ -29,5 +29,5 @@ "**/*.test.*sx", "**/*.test.*s" ], - "exec": "node -e 'console.clear()'; yarn dev:clean; yarn install && yarn dev:nowatch; true" + "exec": "yarn dev:nowatch" } diff --git a/config/nodemon/prod.json b/config/nodemon/prod.json index c9dc8dc65..a48011630 100644 --- a/config/nodemon/prod.json +++ b/config/nodemon/prod.json @@ -32,5 +32,5 @@ "**/*.test.*sx", "**/*.test.*s" ], - "exec": "node -e 'console.clear()'; yarn prod:clean; yarn install && yarn prod && yarn prod:serve; true" + "exec": "yarn prod && yarn prod:serve" } diff --git a/config/webpack/webpack.client.babel.ts b/config/webpack/webpack.client.babel.ts index cf903c1f8..633e12a94 100644 --- a/config/webpack/webpack.client.babel.ts +++ b/config/webpack/webpack.client.babel.ts @@ -145,7 +145,7 @@ export default { compress: true, disableHostCheck: true, historyApiFallback: true, - host: '0.0.0.0', + host: '127.0.0.1', hot: true, lazy: false, overlay: { @@ -360,7 +360,7 @@ export default { analyze && new BundleAnalyzerPlugin({ analyzerMode: 'server', - analyzerHost: '0.0.0.0', + analyzerHost: '127.0.0.1', analyzerPort, openAnalyzer: false, defaultSizes: 'gzip', diff --git a/package.json b/package.json index dfc29fe0d..bf804a766 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "module": "src/index.tsx", "license": "MIT", "scripts": { + "predev": "node -e 'console.clear()' && yarn install && yarn dev:clean", "dev": "nodemon --config config/nodemon/dev.json", - "dev:nowatch": "cross-env NODE_ENV=development BABEL_ENV=development babel-node node_modules/.bin/webpack-dev-server --config config/webpack/webpack.client.babel.ts", + "dev:nowatch": "cross-env NODE_ENV=development BABEL_ENV=development webpack-dev-server --config config/webpack/webpack.client.babel.ts", "dev:clean": "rimraf '../.build/development/{*,.*}' 'node_modules/.cache'", - "prod": "cross-env NODE_ENV=production BABEL_ENV=production babel-node node_modules/.bin/webpack --config config/webpack/webpack.client.babel.ts", + "preprod": "node -e 'console.clear()' && yarn install && yarn prod:clean", + "prod": "cross-env NODE_ENV=production BABEL_ENV=production webpack --config config/webpack/webpack.client.babel.ts", "prod:clean": "rimraf '../.build/production/{*,.*}' 'node_modules/.cache'", "prod:serve": "nodemon --quiet --exec babel-node --extensions '.ts' ./src/server/server.ts", "prod:watch": "nodemon --config config/nodemon/prod.json",