@@ -13,7 +13,7 @@ If you are using the [Nest CLI](https://docs.nestjs.com/cli/overview), the confi
13
13
First install the required packages:
14
14
15
15
``` bash
16
- $ npm i --save-dev webpack-node-externals start-server -webpack-plugin
16
+ $ npm i --save-dev webpack-node-externals run-script -webpack-plugin
17
17
```
18
18
19
19
#### Configuration
@@ -23,7 +23,7 @@ Once the installation is complete, create a `webpack-hmr.config.js` file in the
23
23
``` typescript
24
24
const webpack = require (' webpack' );
25
25
const nodeExternals = require (' webpack-node-externals' );
26
- const StartServerPlugin = require (' start-server -webpack-plugin' );
26
+ const { RunScriptWebpackPlugin } = require (' run-script -webpack-plugin' );
27
27
28
28
module .exports = function (options ) {
29
29
return {
@@ -39,7 +39,7 @@ module.exports = function(options) {
39
39
... options .plugins ,
40
40
new webpack .HotModuleReplacementPlugin (),
41
41
new webpack .WatchIgnorePlugin ([/ \. js$ / , / \. d\. ts$ / ]),
42
- new StartServerPlugin ({ name: options .output .filename }),
42
+ new RunScriptWebpackPlugin ({ name: options .output .filename }),
43
43
],
44
44
};
45
45
};
@@ -87,7 +87,7 @@ If you are not using the [Nest CLI](https://docs.nestjs.com/cli/overview), the c
87
87
First install the required packages:
88
88
89
89
``` bash
90
- $ npm i --save-dev webpack webpack-cli webpack-node-externals ts-loader start-server -webpack-plugin
90
+ $ npm i --save-dev webpack webpack-cli webpack-node-externals ts-loader run-script -webpack-plugin
91
91
```
92
92
93
93
#### Configuration
@@ -98,7 +98,7 @@ Once the installation is complete, create a `webpack.config.js` file in the root
98
98
const webpack = require (' webpack' );
99
99
const path = require (' path' );
100
100
const nodeExternals = require (' webpack-node-externals' );
101
- const StartServerPlugin = require (' start-server -webpack-plugin' );
101
+ const { RunScriptWebpackPlugin } = require (' run-script -webpack-plugin' );
102
102
103
103
module .exports = {
104
104
entry: [' webpack/hot/poll?100' , ' ./src/main.ts' ],
@@ -124,7 +124,7 @@ module.exports = {
124
124
},
125
125
plugins: [
126
126
new webpack .HotModuleReplacementPlugin (),
127
- new StartServerPlugin ({ name: ' server.js' }),
127
+ new RunScriptWebpackPlugin ({ name: ' server.js' }),
128
128
],
129
129
output: {
130
130
path: path .join (__dirname , ' dist' ),
0 commit comments