File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ build/Release
3030# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
3131node_modules
3232
33+ # Vendors file
34+ vendors.js
35+
3336
3437# ## OSX ###
3538.DS_Store
@@ -58,7 +61,6 @@ Network Trash Folder
5861Temporary Items
5962.apdisk
6063
61-
6264# ## Sass ###
6365.sass-cache
6466* .css.map
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ scripts
1111.scss-lint.yml
1212npm-debug.log
1313webpack.config.js
14+ vendors.js
Original file line number Diff line number Diff line change 11{
22 "name" : " react-feature-toggle" ,
3- "version" : " 0.1 .0" ,
3+ "version" : " 0.2 .0" ,
44 "main" : " dist/" ,
55 "scripts" : {
66 "clean:lib" : " rimraf ./lib/*" ,
Original file line number Diff line number Diff line change @@ -62,7 +62,10 @@ if(TARGET === 'start:server' || !TARGET) {
6262
6363if ( TARGET === 'dist' ) {
6464 module . exports = merge ( base , {
65- entry : path . resolve ( __dirname , 'docs/index.jsx' ) ,
65+ entry : {
66+ app : path . resolve ( __dirname , 'docs/index.jsx' ) ,
67+ vendors : [ 'react' , 'react-dom' , 'babel-polyfill' ]
68+ } ,
6669 output : {
6770 filename : 'dist/index.js'
6871 } ,
@@ -71,7 +74,8 @@ if(TARGET === 'dist') {
7174 compress : {
7275 warnings : false
7376 }
74- } )
77+ } ) ,
78+ new webpack . optimize . CommonsChunkPlugin ( 'vendors' , 'vendors.js' )
7579 ]
7680 } ) ;
7781}
You can’t perform that action at this time.
0 commit comments