developit / microbundle

📦 Zero-configuration bundler for tiny modules.
https://npm.im/microbundle
MIT License
8.04k stars 362 forks source link

Fix: preserve terser annotations regexp #875

Closed dwightjack closed 2 years ago

dwightjack commented 3 years ago

Related to https://github.com/developit/microbundle/issues/871.

This PR fixes the regexp that preserves terser annotations in bundles.

changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: d3ffb5945c91779e7d5072316d81858777829c90

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------- | ----- | | microbundle | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

developit commented 3 years ago

Test failures all seem to be due to output for TS CJS/UMD bundles now marking require().default as /*#__PURE__*/. Seems a bit explicit, but I don't think there's a TS option that turns off insertion just for default imports.

dwightjack commented 3 years ago

@developit I am not sure about the action required to fix the CI issue. Is it fine to update the snapshot, or should I do something else?

developit commented 3 years ago

@dwightjack updating the snapshot would be a good first step, yep. We can review the changes individually then.

dwightjack commented 3 years ago

@developit Thanks! I've updated the snapshot. Changes included terser annotations and bundle size change (increased, I guess, because of the annotations).