From f601846baa336bea00bbdb651c1b64b84bf56fd8 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Tue, 23 Aug 2022 12:40:21 -0500 Subject: [PATCH 1/2] chore: Silence Rollup's `this is undefined` warning --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ddf90f2d..11993128 100644 --- a/src/index.js +++ b/src/index.js @@ -473,7 +473,7 @@ function createConfig(options, entry, format, writeMeta) { `\n ↳ to depend on a module via import/require, install it to "dependencies".`, ); return; - } + } else if (warning.code === 'THIS_IS_UNDEFINED') return; warn(warning); }, From 5bf0b494180052f7b18bf20be5beb68f568a87e4 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Tue, 23 Aug 2022 12:41:54 -0500 Subject: [PATCH 2/2] docs: Adding changeset --- .changeset/swift-plums-fix.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/swift-plums-fix.md diff --git a/.changeset/swift-plums-fix.md b/.changeset/swift-plums-fix.md new file mode 100644 index 00000000..941c04d4 --- /dev/null +++ b/.changeset/swift-plums-fix.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Silence Rollup's noisy (and usually harmless) `The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten.` warnings