File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1240,5 +1240,33 @@ module.exports = {
1240
1240
) ;
1241
1241
} ) ;
1242
1242
} ) ;
1243
+
1244
+ describe ( 'entrypoints.json' , ( ) => {
1245
+ it ( 'Use "all" splitChunks & look at entrypoints.json' , ( done ) => {
1246
+ const config = createWebpackConfig ( 'web/build' , 'dev' ) ;
1247
+ config . addEntry ( 'main' , [ './css/roboto_font.css' , './js/no_require' , 'vue' ] ) ;
1248
+ config . addEntry ( 'other' , [ './css/roboto_font.css' , 'vue' ] ) ;
1249
+ config . setPublicPath ( '/build' ) ;
1250
+ config . configureSplitChunks ( ( splitChunks ) => {
1251
+ splitChunks . chunks = 'all' ;
1252
+ splitChunks . minSize = 0 ;
1253
+ } ) ;
1254
+
1255
+ testSetup . runWebpack ( config , ( webpackAssert ) => {
1256
+ webpackAssert . assertOutputJsonFileMatches ( 'entrypoints.json' , {
1257
+ main : {
1258
+ js : [ 'vendors~main~other.js' , 'main~other.js' , 'main.js' ] ,
1259
+ css : [ 'main~other.css' ]
1260
+ } ,
1261
+ other : {
1262
+ js : [ 'vendors~main~other.js' , 'main~other.js' , 'other.js' ] ,
1263
+ css : [ 'main~other.css' ]
1264
+ } ,
1265
+ } ) ;
1266
+
1267
+ done ( ) ;
1268
+ } ) ;
1269
+ } ) ;
1270
+ } ) ;
1243
1271
} ) ;
1244
1272
} ) ;
You can’t perform that action at this time.
0 commit comments