diff --git a/.changeset/hot-dryers-train.md b/.changeset/hot-dryers-train.md new file mode 100644 index 00000000..d12b08cd --- /dev/null +++ b/.changeset/hot-dryers-train.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Silences warnings when using Node builtins with the 'node:...' protocol on imports. Warnings related to bare usage of these builtins were already silenced. diff --git a/src/index.js b/src/index.js index de04f040..950d0897 100644 --- a/src/index.js +++ b/src/index.js @@ -347,7 +347,7 @@ function createConfig(options, entry, format, writeMeta) { // We want to silence rollup warnings for node builtins as we rollup-node-resolve threats them as externals anyway // @see https://github.com/rollup/plugins/tree/master/packages/node-resolve/#resolving-built-ins-like-fs if (options.target === 'node') { - external = external.concat(builtinModules); + external = [/node:.*/].concat(builtinModules); } const peerDeps = Object.keys(pkg.peerDependencies || {});