Skip to content

Commit eaebb31

Browse files
committed
moving test
1 parent ce8c0df commit eaebb31

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/functional.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,5 +1240,33 @@ module.exports = {
12401240
);
12411241
});
12421242
});
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+
});
12431271
});
12441272
});

0 commit comments

Comments
 (0)