title | staticFileName | author | createDate | description | keywords | category |
---|---|---|---|---|---|---|
vue.config.js: 'plugins' is not allowed |
vue_cfg_plugins.html |
guoqzuo |
2020/11/30 |
在 vue.config.js 中,webpack 相关的配置需要写到 configureWebpack 里,不能直接写到外面,否则会报错:vue.config.js: 'plugins' is not allowed。 |
plugins is not allowed |
Vue |
在 vue.config.js 中,webpack 相关的配置需要写到 configureWebpack 里,不能直接写到外面,否则会报错:vue.config.js: 'plugins' is not allowed。
// vue.config.js
module.exports = {
plugins: [], // error,"plugins" is not allowed
configureWebpack: {
plugins: [], // 正确写法
externals: {}
}
};