diff --git a/packages/playground/infinite-deps/__tests__/infinite-deps.spec.ts b/packages/playground/infinite-deps/__tests__/infinite-deps.spec.ts new file mode 100644 index 00000000000000..c9b7236e0087f0 --- /dev/null +++ b/packages/playground/infinite-deps/__tests__/infinite-deps.spec.ts @@ -0,0 +1,11 @@ +import { isBuild, getColor, untilUpdated } from '../../testUtils' + +if (isBuild) { + test('should have css applied on second dynamic import', async () => { + await untilUpdated(() => page.textContent('.content'), 'Initial', true) + await page.click('.b') + + await untilUpdated(() => page.textContent('.content'), 'Reference', true) + expect(await getColor('.content')).toBe('red') + }) +} diff --git a/packages/playground/infinite-deps/deps.json b/packages/playground/infinite-deps/deps.json new file mode 100644 index 00000000000000..e5b880c83bc21b --- /dev/null +++ b/packages/playground/infinite-deps/deps.json @@ -0,0 +1 @@ +{"a0":"./a0.js","a1":"./a1.js","a2":"./a2.js","a3":"./a3.js","a4":"./a4.js","a5":"./a5.js","a6":"./a6.js","a7":"./a7.js","a8":"./a8.js","a9":"./a9.js","a10":"./a10.js","a11":"./a11.js","a12":"./a12.js","a13":"./a13.js","a14":"./a14.js","a15":"./a15.js","a16":"./a16.js","a17":"./a17.js","a18":"./a18.js","a19":"./a19.js","a20":"./a20.js","a21":"./a21.js","a22":"./a22.js","a23":"./a23.js","a24":"./a24.js"} \ No newline at end of file diff --git a/packages/playground/infinite-deps/dynamic-a.js b/packages/playground/infinite-deps/dynamic-a.js new file mode 100644 index 00000000000000..afc6430baa75fb --- /dev/null +++ b/packages/playground/infinite-deps/dynamic-a.js @@ -0,0 +1 @@ +import './reference' diff --git a/packages/playground/infinite-deps/dynamic-b.js b/packages/playground/infinite-deps/dynamic-b.js new file mode 100644 index 00000000000000..afc6430baa75fb --- /dev/null +++ b/packages/playground/infinite-deps/dynamic-b.js @@ -0,0 +1 @@ +import './reference' diff --git a/packages/playground/infinite-deps/entrypoints/a0.js b/packages/playground/infinite-deps/entrypoints/a0.js new file mode 100644 index 00000000000000..5b3604ba69b7a9 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a0.js @@ -0,0 +1,57 @@ +import a1 from './a1' +import a2 from './a2' +import a3 from './a3' +import a4 from './a4' +import a5 from './a5' +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export function other() { + return ( + a1() + + a2() + + a3() + + a4() + + a5() + + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a1.js b/packages/playground/infinite-deps/entrypoints/a1.js new file mode 100644 index 00000000000000..d11aaf472b171f --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a1.js @@ -0,0 +1,57 @@ +import a2 from './a2' +import a3 from './a3' +import a4 from './a4' +import a5 from './a5' +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a0.js') + +export function other() { + return ( + a2() + + a3() + + a4() + + a5() + + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a10.js b/packages/playground/infinite-deps/entrypoints/a10.js new file mode 100644 index 00000000000000..d37c46515fc374 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a10.js @@ -0,0 +1,39 @@ +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a9.js') + +export function other() { + return ( + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a11.js b/packages/playground/infinite-deps/entrypoints/a11.js new file mode 100644 index 00000000000000..4a1da6d800d7d0 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a11.js @@ -0,0 +1,37 @@ +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a10.js') + +export function other() { + return ( + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a12.js b/packages/playground/infinite-deps/entrypoints/a12.js new file mode 100644 index 00000000000000..f4e2a48f818a6f --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a12.js @@ -0,0 +1,35 @@ +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a11.js') + +export function other() { + return ( + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a13.js b/packages/playground/infinite-deps/entrypoints/a13.js new file mode 100644 index 00000000000000..ac25fc75066ccf --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a13.js @@ -0,0 +1,33 @@ +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a12.js') + +export function other() { + return ( + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a14.js b/packages/playground/infinite-deps/entrypoints/a14.js new file mode 100644 index 00000000000000..998e6497a2e5b1 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a14.js @@ -0,0 +1,31 @@ +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a13.js') + +export function other() { + return ( + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a15.js b/packages/playground/infinite-deps/entrypoints/a15.js new file mode 100644 index 00000000000000..1f0df1baaf8147 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a15.js @@ -0,0 +1,19 @@ +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a14.js') + +export function other() { + return a16() + a17() + a18() + a19() + a20() + a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a16.js b/packages/playground/infinite-deps/entrypoints/a16.js new file mode 100644 index 00000000000000..85c020aeb25a3d --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a16.js @@ -0,0 +1,18 @@ +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a15.js') + +export function other() { + return a17() + a18() + a19() + a20() + a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a17.js b/packages/playground/infinite-deps/entrypoints/a17.js new file mode 100644 index 00000000000000..38b7b4b14031f4 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a17.js @@ -0,0 +1,17 @@ +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a16.js') + +export function other() { + return a18() + a19() + a20() + a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a18.js b/packages/playground/infinite-deps/entrypoints/a18.js new file mode 100644 index 00000000000000..8e05ae7baed703 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a18.js @@ -0,0 +1,16 @@ +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a17.js') + +export function other() { + return a19() + a20() + a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a19.js b/packages/playground/infinite-deps/entrypoints/a19.js new file mode 100644 index 00000000000000..3eef7679a77b13 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a19.js @@ -0,0 +1,15 @@ +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a18.js') + +export function other() { + return a20() + a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a2.js b/packages/playground/infinite-deps/entrypoints/a2.js new file mode 100644 index 00000000000000..cc55b1c6d128c3 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a2.js @@ -0,0 +1,55 @@ +import a3 from './a3' +import a4 from './a4' +import a5 from './a5' +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a1.js') + +export function other() { + return ( + a3() + + a4() + + a5() + + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a20.js b/packages/playground/infinite-deps/entrypoints/a20.js new file mode 100644 index 00000000000000..2b8acf00c09f48 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a20.js @@ -0,0 +1,14 @@ +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a19.js') + +export function other() { + return a21() + a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a21.js b/packages/playground/infinite-deps/entrypoints/a21.js new file mode 100644 index 00000000000000..d70a04cc1ca944 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a21.js @@ -0,0 +1,13 @@ +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a20.js') + +export function other() { + return a22() + a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a22.js b/packages/playground/infinite-deps/entrypoints/a22.js new file mode 100644 index 00000000000000..0cc918499f567e --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a22.js @@ -0,0 +1,12 @@ +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a21.js') + +export function other() { + return a23() + a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a23.js b/packages/playground/infinite-deps/entrypoints/a23.js new file mode 100644 index 00000000000000..24327e87a67b80 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a23.js @@ -0,0 +1,11 @@ +import a24 from './a24' + +export const that = () => import('./a22.js') + +export function other() { + return a24() +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a24.js b/packages/playground/infinite-deps/entrypoints/a24.js new file mode 100644 index 00000000000000..2e26aa9b06df1b --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a24.js @@ -0,0 +1,9 @@ +export const that = () => import('./a23.js') + +export function other() { + return +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a3.js b/packages/playground/infinite-deps/entrypoints/a3.js new file mode 100644 index 00000000000000..ae47afb454a84c --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a3.js @@ -0,0 +1,53 @@ +import a4 from './a4' +import a5 from './a5' +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a2.js') + +export function other() { + return ( + a4() + + a5() + + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a4.js b/packages/playground/infinite-deps/entrypoints/a4.js new file mode 100644 index 00000000000000..eeb01443c85c8e --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a4.js @@ -0,0 +1,51 @@ +import a5 from './a5' +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a3.js') + +export function other() { + return ( + a5() + + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a5.js b/packages/playground/infinite-deps/entrypoints/a5.js new file mode 100644 index 00000000000000..d5bd225e69032b --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a5.js @@ -0,0 +1,49 @@ +import a6 from './a6' +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a4.js') + +export function other() { + return ( + a6() + + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a6.js b/packages/playground/infinite-deps/entrypoints/a6.js new file mode 100644 index 00000000000000..3bcc7a8fe8e29b --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a6.js @@ -0,0 +1,47 @@ +import a7 from './a7' +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a5.js') + +export function other() { + return ( + a7() + + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a7.js b/packages/playground/infinite-deps/entrypoints/a7.js new file mode 100644 index 00000000000000..6bcf560a6664ba --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a7.js @@ -0,0 +1,45 @@ +import a8 from './a8' +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a6.js') + +export function other() { + return ( + a8() + + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a8.js b/packages/playground/infinite-deps/entrypoints/a8.js new file mode 100644 index 00000000000000..1948208415ae30 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a8.js @@ -0,0 +1,43 @@ +import a9 from './a9' +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a7.js') + +export function other() { + return ( + a9() + + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/entrypoints/a9.js b/packages/playground/infinite-deps/entrypoints/a9.js new file mode 100644 index 00000000000000..09939ed9f3a0f9 --- /dev/null +++ b/packages/playground/infinite-deps/entrypoints/a9.js @@ -0,0 +1,41 @@ +import a10 from './a10' +import a11 from './a11' +import a12 from './a12' +import a13 from './a13' +import a14 from './a14' +import a15 from './a15' +import a16 from './a16' +import a17 from './a17' +import a18 from './a18' +import a19 from './a19' +import a20 from './a20' +import a21 from './a21' +import a22 from './a22' +import a23 from './a23' +import a24 from './a24' + +export const that = () => import('./a8.js') + +export function other() { + return ( + a10() + + a11() + + a12() + + a13() + + a14() + + a15() + + a16() + + a17() + + a18() + + a19() + + a20() + + a21() + + a22() + + a23() + + a24() + ) +} + +export default function () { + return 123 +} diff --git a/packages/playground/infinite-deps/index.html b/packages/playground/infinite-deps/index.html new file mode 100644 index 00000000000000..2a101f9743fd30 --- /dev/null +++ b/packages/playground/infinite-deps/index.html @@ -0,0 +1,5 @@ + + + + +