When I use polyfill-es-shims plugin on my code it tries to import nodeJS util.inspect
which requires rollup-plugin-polyfill-node... #205
Open
Description
And adding 'rollup-plugin-polyfill-node' to my plugins adds a load of additional unnecessary code to the top of all my output files.
I struggle at the best of times to understand what I'm doing with babel and rollup, perhaps I'm doing something wrong.
This makes no sense.
Please help me out.
import { nodeResolve as rollup_node_resolve } from '@rollup/plugin-node-resolve';
import rollup_typescript from '@rollup/plugin-typescript';
import rollup_commonjs from '@rollup/plugin-commonjs';
...
var plugins = [];
plugins.push(
rollup_typescript({
"include": ["index.d.ts", "src/js/**/*.ts"],
compilerOptions: {
"module": "esnext",
"target": "es6",
"isolatedModules": true,
}
}),
rollup_node_resolve(),
rollup_commonjs(),
);
if (PRODUCTION) {
var babel_presets = [];
var babel_plugins = [];
babel_plugins.push(["polyfill-es-shims", { "method": "usage-global" }]);
babel_presets.push(
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "3.22"
}
]
);
plugins.push(
rollup_babel({
"extensions": [".js", ".ts"],
"babelHelpers": "bundled",
"presets": babel_presets,
"plugins": babel_plugins,
})
);
Metadata
Assignees
Labels
No labels