File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ npm i webpack-userscript -D
3131Include the plugin in the ` webpack.config.js ` as the following example.
3232
3333``` js
34- const WebpackUserscript = require (' webpack-userscript' );
34+ const { UserscriptPlugin } = require (' webpack-userscript' );
3535
3636module .exports = {
37- plugins: [new WebpackUserscript ()],
37+ plugins: [new UserscriptPlugin ()],
3838};
3939```
4040
@@ -56,7 +56,7 @@ After the first time starting the `webpack-dev-server`, you can install the scri
5656
5757``` js
5858const path = require (' path' );
59- const WebpackUserscript = require (' webpack-userscript' );
59+ const { UserscriptPlugin } = require (' webpack-userscript' );
6060const dev = process .env .NODE_ENV === ' development' ;
6161
6262module .exports = {
@@ -70,7 +70,7 @@ module.exports = {
7070 contentBase: path .join (__dirname , ' dist' ),
7171 },
7272 plugins: [
73- new WebpackUserscript ({
73+ new UserscriptPlugin ({
7474 headers (original ) {
7575 if (dev) {
7676 return {
@@ -136,4 +136,4 @@ Possible interpolation variables are as follows.
136136
137137## Configuration
138138
139- See [ UserscriptOptions] ( https://cow.moe/webpack-userscript/types/UserscriptOptions.html ) .
139+ See [ UserscriptOptions] ( https://cow.moe/webpack-userscript/types/UserscriptOptions.html ) .
You can’t perform that action at this time.
0 commit comments