Skip to content

Commit 3af7808

Browse files
committed
[LOAD] Inline dynamic imports
Fixes #39
1 parent ea0e296 commit 3af7808

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plugin/load.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ function load(state, config, addWatchFile, id) {
7878
rollup.rollup(inputOptions).then(bundle => {
7979
state.exclude.delete(id);
8080
state.exclude.delete(target);
81-
bundle.generate({format: 'iife', name: 'worker_code', sourcemap: true}).then(result => {
81+
const bundleOptions = {
82+
format: 'iife',
83+
name: 'worker_code',
84+
sourcemap: true,
85+
inlineDynamicImports: true,
86+
};
87+
bundle.generate(bundleOptions).then(result => {
8288
resolve(handleBundleGenerated(state, config, addWatchFile, id, workerID, result));
8389
}).catch(reject);
8490
}).catch(reason => {

0 commit comments

Comments
 (0)