Closed 43081j closed 1 month ago
rollup uses is-builtin-module here: https://github.com/rollup/plugins/blob/9e7f576f33e26d65e9f2221d248a2e000923e03f/packages/node-resolve/src/index.js#L193
is-builtin-module
it has an engine constraint of >=14 which means we can't use isBuiltin from node itself.
>=14
isBuiltin
however, we can use builtinModules with a simple string replace:
builtinModules
import {builtinModules} from 'node:module'; const name = '...'; builtinModules.includes(name.replace('node:', ''));
tracked in rollup/plugins#1735
https://github.com/rollup/plugins/pull/1735 is now merged
rollup uses
is-builtin-module
here: https://github.com/rollup/plugins/blob/9e7f576f33e26d65e9f2221d248a2e000923e03f/packages/node-resolve/src/index.js#L193it has an engine constraint of
>=14
which means we can't useisBuiltin
from node itself.however, we can use
builtinModules
with a simple string replace: