@@ -24,10 +24,10 @@ var webpackConfig = merge(baseWebpackConfig, {
2424 devtool : config . build . productionSourceMap ? '#source-map' : false ,
2525 output : {
2626 path : config . build . assetsRoot ,
27- // filename: utils.assetsPath('js/ [name].[chunkhash].js'),
28- // chunkFilename: utils.assetsPath('js/ [id].[chunkhash].js')
29- filename : utils . assetsPath ( 'js/ [name].js' ) ,
30- chunkFilename : utils . assetsPath ( 'js/ [id].js' )
27+ // filename: utils.assetsPath('[name].[chunkhash].js'),
28+ // chunkFilename: utils.assetsPath('[id].[chunkhash].js')
29+ filename : utils . assetsPath ( '[name].js' ) ,
30+ chunkFilename : utils . assetsPath ( '[id].js' )
3131 } ,
3232 plugins : [
3333 // http://vuejs.github.io/vue-loader/en/workflow/production.html
@@ -39,8 +39,8 @@ var webpackConfig = merge(baseWebpackConfig, {
3939 } ) ,
4040 // extract css into its own file
4141 new ExtractTextPlugin ( {
42- // filename: utils.assetsPath('css/ [name].[contenthash].css')
43- filename : utils . assetsPath ( 'css/ [name].wxss' )
42+ // filename: utils.assetsPath('[name].[contenthash].css')
43+ filename : utils . assetsPath ( '[name].wxss' )
4444 } ) ,
4545 // Compress extracted CSS. We are using this plugin so that possible
4646 // duplicated CSS from different components can be deduped.
@@ -72,7 +72,7 @@ var webpackConfig = merge(baseWebpackConfig, {
7272 new webpack . HashedModuleIdsPlugin ( ) ,
7373 // split vendor js into its own file
7474 new webpack . optimize . CommonsChunkPlugin ( {
75- name : 'vendor' ,
75+ name : 'common/ vendor' ,
7676 minChunks : function ( module , count ) {
7777 // any required modules inside node_modules are extracted to vendor
7878 return (
@@ -85,17 +85,9 @@ var webpackConfig = merge(baseWebpackConfig, {
8585 // extract webpack runtime and module manifest to its own file in order to
8686 // prevent vendor hash from being updated whenever app bundle is updated
8787 new webpack . optimize . CommonsChunkPlugin ( {
88- name : 'manifest' ,
89- chunks : [ 'vendor' ]
90- } ) ,
91- // copy custom static assets
92- new CopyWebpackPlugin ( [
93- {
94- from : path . resolve ( __dirname , '../static' ) ,
95- to : config . build . assetsSubDirectory ,
96- ignore : [ '.*' ]
97- }
98- ] )
88+ name : 'common/manifest' ,
89+ chunks : [ 'common/vendor' ]
90+ } )
9991 ]
10092} )
10193
0 commit comments