preact-cli
preact-cli copied to clipboard
Enable regenerator in legacy bundles
What kind of change does this PR introduce?
Transpiles generators to regenerator in legacy bundles.
Summary
In 3.3.0, we stopped using fast-async
to transpile async functions, however this meant they were transpiled to generators, which we don't transpile at all. The modern bundles should be unaffected by all of these changes, so let's enable regenerator to handle both async and generator functions in legacy bundles.
Does this PR introduce a breaking change?
No, it fixes an unintentionally-breaking change.
🦋 Changeset detected
Latest commit: dcf6a21daf428ba2cc6868e9155dbdfa96e5d8f3
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Name | Type |
---|---|
preact-cli | 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
Not sure how I managed to make the Service Worker tests fail with this PR.
Seems both service workers (esm and legacy) are having regenerator inserted in. I imagine they should be excluded?
@rschristian I was thinking that was the case, yeah. Neither should have it, or at least the modern one shouldn't have it (the legacy sw file never gets used, no browsers support SW that don't also support ESM).
Darn, function Use
entries are only supported as of Webpack 4