Skip to content

Commit a276847

Browse files
authored
Update webpack-hmr.config.js
Use existing variables instead of overwriting them with hardcoded ones
1 parent 00658ca commit a276847

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sample/08-webpack/webpack-hmr.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const StartServerPlugin = require('start-server-webpack-plugin');
55
module.exports = function(options) {
66
return {
77
...options,
8-
entry: ['webpack/hot/poll?100', './src/main.ts'],
8+
entry: ['webpack/hot/poll?100', options.entry],
99
watch: true,
1010
externals: [
1111
nodeExternals({
@@ -15,7 +15,7 @@ module.exports = function(options) {
1515
plugins: [
1616
...options.plugins,
1717
new webpack.HotModuleReplacementPlugin(),
18-
new StartServerPlugin({ name: 'main.js' }),
18+
new StartServerPlugin({ name: options.output.filename }),
1919
],
2020
};
2121
};

0 commit comments

Comments
 (0)