This repository was archived by the owner on Sep 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 77 "test-watch" : " karma start --singleRun=false --autoWatch=true" ,
88 "commit" : " npm run prepublish && npm test && git-cz" ,
99 "prepublish" : " ngc && npm run build" ,
10- "build" : " webpack && cp bundles/angular-provide-once .umd.js bundles/index.js" ,
10+ "build" : " webpack && cp bundles/main .umd.js bundles/index.js" ,
1111 "semantic-release" : " semantic-release pre && npm publish && semantic-release post"
1212 },
1313 "repository" : {
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ module.exports = {
2424 output : {
2525 path : helpers . root ( 'bundles' ) ,
2626 publicPath : '/' ,
27- filename : 'angular-provide-once .umd.js' ,
27+ filename : '[name] .umd.js' ,
2828 libraryTarget : 'umd' ,
2929 library : 'angular-provide-once'
3030 } ,
3131
3232 // require those dependencies but don't bundle them
33- externals : [ / ^ \@ a n g u l a r \/ / , / ^ r x j s \/ / ] ,
33+ externals : [ / ^ a n g u l a r \/ / , / ^ r x j s \/ / ] ,
3434
3535 module : {
3636 rules : [ {
@@ -59,6 +59,14 @@ module.exports = {
5959 failOnHint : false
6060 }
6161 }
62+ } ) ,
63+
64+ new webpack . optimize . CommonsChunkPlugin ( {
65+ name : 'vendor' ,
66+ minChunks : function ( module ) {
67+ // this assumes your vendor imports exist in the node_modules directory
68+ return module . context && module . context . indexOf ( 'node_modules' ) !== - 1 ;
69+ }
6270 } )
6371 ]
6472} ;
You can’t perform that action at this time.
0 commit comments