File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,13 @@ module.exports = (api, options) => {
118
118
119
119
api . configureWebpack ( ( webpackConfig ) => {
120
120
const omitUserScripts = ( { name } ) => ! userScripts . includes ( name )
121
- if ( isProduction ) {
122
- webpackConfig . optimization . splitChunks . cacheGroups . vendors . chunks = omitUserScripts
123
- webpackConfig . optimization . splitChunks . cacheGroups . common . chunks = omitUserScripts
121
+ if ( webpackConfig . optimization && webpackConfig . optimization . splitChunks && webpackConfig . optimization . splitChunks . cacheGroups ) {
122
+ if ( webpackConfig . optimization . splitChunks . cacheGroups . vendors ) {
123
+ webpackConfig . optimization . splitChunks . cacheGroups . vendors . chunks = omitUserScripts
124
+ }
125
+ if ( webpackConfig . optimization . splitChunks . cacheGroups . common ) {
126
+ webpackConfig . optimization . splitChunks . cacheGroups . common . chunks = omitUserScripts
127
+ }
124
128
}
125
129
} )
126
130
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-cli-plugin-browser-extension" ,
3
- "version" : " 0.23.0 " ,
3
+ "version" : " 0.23.1 " ,
4
4
"description" : " Browser extension development plugin for vue-cli 3.0" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments