Skip to content

Commit

Permalink
chore: Silence Rollup's this is undefined warnings (#991)
Browse files Browse the repository at this point in the history
* chore: Silence Rollup's `this is undefined` warning

* docs: Adding changeset
  • Loading branch information
rschristian authored Feb 23, 2023
1 parent 22187fb commit bb8713c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/swift-plums-fix.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,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);
},
Expand Down

0 comments on commit bb8713c

Please sign in to comment.