rollup-plugin-polyfill-node icon indicating copy to clipboard operation
rollup-plugin-polyfill-node copied to clipboard

Not polyfilling node:path

Open UziTech opened this issue 1 year ago • 1 comments

It seems like node:* imports are not being polyfilled

see https://github.com/UziTech/eslint-linter-browserify/issues/426

UziTech avatar May 27 '24 05:05 UziTech

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(),
	],
};

hakatashi avatar Mar 09 '25 02:03 hakatashi