Skip to content

Commit 55bc10c

Browse files
committed
🎨 Detect build chunks via dynamic imports in rollup
1 parent b4fd999 commit 55bc10c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const plugins = [
5959
].filter(plugin => plugin !== null);
6060

6161
const baseOptions = {
62-
input: [src('index.ts'), src('views/view-party.ts'), src('views/view-tv.ts')],
62+
input: src('index.ts'),
6363
experimentalDynamicImport: true,
6464
experimentalCodeSplitting: true,
6565
plugins,
@@ -70,14 +70,14 @@ const baseOptions = {
7070
export default [{
7171
...baseOptions,
7272
output: {
73-
dir: dist('module'),
73+
file: dist('module/index.js'),
7474
format: 'es',
7575
sourcemap: true,
7676
},
7777
}, {
7878
...baseOptions,
7979
output: {
80-
dir: dist('nomodule'),
80+
file: dist('nomodule/index.js'),
8181
format: 'system',
8282
sourcemap: true,
8383
},

src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h1><span class="flash">⚡️</span> Oh, no! Unsupported Browser!</h1>
7474
<script class="scripts" src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
7575

7676
<!-- ES6 Module Code -->
77-
<script src="/module/index.ts.js" type="module" class="scripts"></script>
77+
<script src="/module/index.js" type="module" class="scripts"></script>
7878

7979
<!-- SystemJS Module Code -->
8080
<script src="/node_modules/systemjs/dist/system-production.js"
@@ -83,7 +83,7 @@ <h1><span class="flash">⚡️</span> Oh, no! Unsupported Browser!</h1>
8383
nomodule>
8484
</script>
8585
<script class="scripts" nomodule>
86-
System.import('/nomodule/index.ts.js');
86+
System.import('/nomodule/index.js');
8787
</script>
8888

8989
<script>

0 commit comments

Comments
 (0)