rollup-plugin-polyfill-node
rollup-plugin-polyfill-node copied to clipboard
Not polyfilling node:path
It seems like node:* imports are not being polyfilled
see https://github.com/UziTech/eslint-linter-browserify/issues/426
I encountered the same problem and the following workaround with @rollup/plugin-alias worked.
import alias from '@rollup/plugin-alias';
import polyfillNode from 'rollup-plugin-polyfill-node';
/** @type {import('rollup').RollupOptions} */
export default {
plugins: [
alias({
entries: [{find: /^node:(.*)/, replacement: '$1'}],
}),
polyfillNode(),
],
};