Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Bugs with web preset missing dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman committed Feb 15, 2017
1 parent 02e1355 commit 4f1655d
Show file tree
Hide file tree
Showing 3 changed files with 485 additions and 12 deletions.
1 change: 1 addition & 0 deletions packages/neutrino-preset-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0",
"webpack-merge": "^2.6.1",
"worker-loader": "0.7.1"
},
Expand Down
9 changes: 5 additions & 4 deletions packages/neutrino-preset-web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const FILE_LOADER = require.resolve('file-loader');
const CSS_LOADER = require.resolve('css-loader');
const STYLE_LOADER = require.resolve('style-loader');
const URL_LOADER = require.resolve('url-loader');
const PROJECT_MODULES = path.join(CWD, 'node_modules');
const MODULES = path.join(__dirname, '../node_modules');

module.exports = ({ config }) => {
Expand Down Expand Up @@ -181,7 +182,9 @@ module.exports = ({ config }) => {
names: ['vendor', 'manifest'],
minChunks: Infinity
});
} else if (process.env.NODE_ENV === 'development') {
}

if (process.env.NODE_ENV === 'development') {
const protocol = !!process.env.HTTPS ? 'https' : 'http';
const host = process.env.HOST || 'localhost';
const port = parseInt(process.env.PORT) || 5000;
Expand Down Expand Up @@ -217,9 +220,7 @@ module.exports = ({ config }) => {
config
.plugin('hot')
.use(webpack.HotModuleReplacementPlugin);
}

if (process.env.NODE_ENV !== 'development') {
} else {
config.output.filename('[name].[chunkhash].bundle.js');

config
Expand Down
Loading

0 comments on commit 4f1655d

Please sign in to comment.