File tree Expand file tree Collapse file tree
test/configCases/chunk-graph/available-modules-grow-and-shrink Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export default "a" ;
Original file line number Diff line number Diff line change 1+ export default "b" ;
Original file line number Diff line number Diff line change 1+ import a from "./a" ;
2+ import b from "./b" ;
3+
4+ export default [ a , b ] ;
Original file line number Diff line number Diff line change 1+ export default "d" ;
Original file line number Diff line number Diff line change 1+ import a from "./a" ;
2+
3+ it ( "should load a into c after p loses it" , async ( ) => {
4+ expect ( a ) . toBe ( "a" ) ;
5+ const p1 = await import ( /* webpackChunkName: "p" */ "./p1" ) ;
6+ const c = await p1 . loadC ( ) ;
7+ expect ( c . default ) . toEqual ( [ "a" , "b" ] ) ;
8+ } ) ;
Original file line number Diff line number Diff line change 1+ it ( "should load d from the block found when p grows" , async ( ) => {
2+ const q = await import ( "./q" ) ;
3+ const p2 = await q . loadP2 ( ) ;
4+ expect ( p2 . default ) . toBe ( "b" ) ;
5+ expect ( ( await p2 . loadD ( ) ) . default ) . toBe ( "d" ) ;
6+ expect ( ( await p2 . loadC ( ) ) . default ) . toEqual ( [ "a" , "b" ] ) ;
7+ } ) ;
Original file line number Diff line number Diff line change 1+ export const loadC = ( ) => import ( /* webpackChunkName: "c" */ "./c" ) ;
Original file line number Diff line number Diff line change 1+ export { default } from "./b" ;
2+ export const loadC = ( ) => import ( /* webpackChunkName: "c" */ "./c" ) ;
3+ export const loadD = ( ) => import ( /* webpackChunkName: "d" */ "./d" ) ;
Original file line number Diff line number Diff line change 1+ export const loadP2 = ( ) => import ( /* webpackChunkName: "p" */ "./p2" ) ;
Original file line number Diff line number Diff line change 1+ "use strict" ;
2+
3+ module . exports = {
4+ findBundle ( ) {
5+ return [ "main.js" , "other.js" ] ;
6+ }
7+ } ;
You can’t perform that action at this time.
0 commit comments