Skip to content

Commit

Permalink
Fix: rollup fails to build if you provide no environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Jan 10, 2024
1 parent 0a8ab73 commit 4d9f252
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/configs/rollup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ if (namespace === 'PIXI')
}

export default [
// Module browser bundle (esm)
{
external,
plugins: browserPlugins,
input: extensionConfig.bundleModuleSource ?? source,
treeshake: false,
output: {
banner,
file: bundleModule,
format: 'esm',
sourcemap: true,
exports: extensionConfig.bundleModuleExports,
},
},
...!extensionConfig.environments.includes('node') ? [] : [{
external,
input: source,
Expand Down Expand Up @@ -167,19 +181,5 @@ export default [
globals,
exports: extensionConfig.bundleExports,
},
},
// Module browser bundle (esm)
{
external,
plugins: browserPlugins,
input: extensionConfig.bundleModuleSource ?? source,
treeshake: false,
output: {
banner,
file: bundleModule,
format: 'esm',
sourcemap: true,
exports: extensionConfig.bundleModuleExports,
},
}],
];

0 comments on commit 4d9f252

Please sign in to comment.