diff --git a/package.json b/package.json index 2f6c06a75..7ad36c352 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "babel-eslint": "^10.0.1", "babel-jest": "^23.6.0", "babel-plugin-import": "^1.12.0", + "code-inspector-plugin": "^1.2.10", "eruda": "^1.5.7", "eslint": "^5.16.0", "eslint-plugin-prettier": "^3.1.0", diff --git a/vue.config.js b/vue.config.js index 3a6eedf41..e1ecce60e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -31,6 +31,14 @@ module.exports = { } }, chainWebpack: config => { + const { codeInspectorPlugin } = require('code-inspector-plugin'); + + config.plugin('code-inspector-plugin').use( + codeInspectorPlugin({ + bundler: 'webpack', + }) + ); + // 移除 prefetch 插件 config.plugins.delete('prefetch') // // 压缩代码