-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack dev server #8
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need some tests for the new config. E.g. check that the publicPath is constructed correctly.
src/index.js
Outdated
@@ -223,6 +228,7 @@ function createWebpackConfig(options) { | |||
output: { | |||
filename: outFile, | |||
path: outDir, | |||
publicPath: options.outDir.replace(MATCHES_LEADING_DOT_SLASHES, ''), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add this option only to devServer
https://webpack.js.org/configuration/dev-server/#devserver-publicpath-
src/index.js
Outdated
@@ -8,7 +8,12 @@ const POLYFILLS = [ | |||
require.resolve('babel-polyfill'), | |||
require.resolve('raf/polyfill'), | |||
]; | |||
|
|||
const HOST = '0.0.0.0'; | |||
const PORT = 3000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should pull these from process.env
, and have these as default values.
const { HOST = '0.0.0.0', PORT = 3000 } = process.env;
…ocess.env and specify default values
…k-config into webpack-dev-server
Additional settings for webpack dev server