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) => {
118118
119119 api . configureWebpack ( ( webpackConfig ) => {
120120 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+ }
124128 }
125129 } )
126130}
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-cli-plugin-browser-extension" ,
3- "version" : " 0.23.0 " ,
3+ "version" : " 0.23.1 " ,
44 "description" : " Browser extension development plugin for vue-cli 3.0" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments