Skip to content

Commit 58ea877

Browse files
author
longshihui
committed
fix(inspect): 修复html-webpack-plugin获取失败的问题
1 parent bd42e3a commit 58ea877

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

lib/vue-cli.inspect.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,18 @@ module.exports = (api, projectOptions) => {
3333
.add(resolve('./dist/homepage.js'))
3434
.end();
3535
// add navigator entry html
36-
config
37-
.plugin(PLUGIN_NAME)
38-
.use(require(resolve('node_modules/html-webpack-plugin')), [
39-
{
40-
meta: {
41-
navigator: navigatorData
42-
},
43-
filename: `${PLUGIN_NAME}.html`,
44-
favicon: resolve('./public/favicon.ico'),
45-
title: 'welcome to navigator center',
46-
template: resolve('./public/index.html'),
47-
chunks: [PLUGIN_NAME]
48-
}
49-
]);
36+
config.plugin(PLUGIN_NAME).use(require('html-webpack-plugin'), [
37+
{
38+
meta: {
39+
navigator: navigatorData
40+
},
41+
filename: `${PLUGIN_NAME}.html`,
42+
favicon: resolve('./public/favicon.ico'),
43+
title: 'welcome to navigator center',
44+
template: resolve('./public/index.html'),
45+
chunks: [PLUGIN_NAME]
46+
}
47+
]);
5048
// refer the index page to plugin index
5149
config.devServer.set('index', `${PLUGIN_NAME}.html`);
5250
// default open plugin index when user config devServer.open = true

0 commit comments

Comments
 (0)