From 8683acabef389efa851e4c2bbd6d3bc0d3779a3c Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Tue, 3 May 2022 21:06:37 -0500 Subject: [PATCH 1/2] chore: Silence warnings when using builtins w/ 'node:' protocol --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 || {}); From b70d7d01f2a8613456eeecc724f7faf4169ff569 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Tue, 3 May 2022 21:08:01 -0500 Subject: [PATCH 2/2] docs: Adding changeset --- .changeset/hot-dryers-train.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/hot-dryers-train.md 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.