File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ const ZipPlugin = require('zip-webpack-plugin')
88const defaultOptions = {
99 components : { } ,
1010 componentOptions : { } ,
11- manifestSync : [ 'version' ]
11+ manifestSync : [ 'version' ] ,
12+ environmentsToZip : [ 'production' ]
1213}
1314
1415module . exports = ( api , options ) => {
@@ -105,10 +106,10 @@ module.exports = (api, options) => {
105106 }
106107 } ] ) )
107108
108- if ( isProduction ) {
109+ if ( pluginOptions . environmentsToZip . includes ( api . service . mode ) ) {
109110 webpackConfig . plugins . push ( new ZipPlugin ( {
110111 path : api . resolve ( `${ options . outputDir || 'dist' } -zip` ) ,
111- filename : `${ packageJson . name } -v${ packageJson . version } .zip`
112+ filename : `${ packageJson . name } -v${ packageJson . version } - ${ api . service . mode } .zip`
112113 } ) )
113114 }
114115
You can’t perform that action at this time.
0 commit comments