Skip to content

Commit 1e0b176

Browse files
Merge pull request #1093 from MickL/patch-1
Update hot-reload.md to work with monorepo
2 parents 3d66fa8 + 0795384 commit 1e0b176

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/recipes/hot-reload.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const StartServerPlugin = require('start-server-webpack-plugin');
2828
module.exports = function(options) {
2929
return {
3030
...options,
31-
entry: ['webpack/hot/poll?100', './src/main.ts'],
31+
entry: ['webpack/hot/poll?100', options.entry],
3232
watch: true,
3333
externals: [
3434
nodeExternals({
@@ -39,7 +39,7 @@ module.exports = function(options) {
3939
...options.plugins,
4040
new webpack.HotModuleReplacementPlugin(),
4141
new webpack.WatchIgnorePlugin([/\.js$/, /\.d\.ts$/]),
42-
new StartServerPlugin({ name: 'main.js' }),
42+
new StartServerPlugin({ name: options.output.filename }),
4343
],
4444
};
4545
};
@@ -69,7 +69,7 @@ bootstrap();
6969
To simplify the execution process, add a script to your `package.json` file.
7070

7171
```json
72-
"start:dev": "nest build --watch --webpack --webpackPath webpack-hmr.config.js"
72+
"start:dev": "nest build --webpack --webpackPath webpack-hmr.config.js"
7373
```
7474

7575
Now simply open your command line and run the following command:

0 commit comments

Comments
 (0)