Skip to content

Commit

Permalink
fix: enable interop back in Rollup (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter committed Feb 21, 2022
1 parent 35ec68e commit 95b0a74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/getRollupOptions.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
function getRollupOptions(/** @type {import('rollup').RollupOptions} */ options) {
// Following options are overridden:
// - `preserveModules` & `preserveModulesRoot` to stop bundling to a single file and prevent bundle size issues
// - `interop` to not include interop for `import * as` syntax
// - `sourcemap` to enable sourcemaps

if (Array.isArray(options.output)) {
options.output.forEach(o => {
o.preserveModules = true;
o.preserveModulesRoot = 'src';
o.interop = false;
o.sourcemap = true;
});
} else {
options.output = {
...options.output,
preserveModules: true,
preserveModulesRoot: 'src',
interop: false,
sourcemap: true,
};
}
Expand Down

0 comments on commit 95b0a74

Please sign in to comment.