Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fresh-paws-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"preact-cli": patch
---

Transpile generators and async functions in legacy bundles. Async functions were inadvertently transpiled to generators in 3.3.0, this transpiles them to ES5.
3 changes: 1 addition & 2 deletions packages/cli/lib/lib/babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports = function (env, options = {}) {
modules: options.modules || false,
targets: {
browsers: options.browsers,
},
exclude: ['transform-regenerator'],
}
},
],
],
Expand Down
1 change: 1 addition & 0 deletions packages/cli/lib/lib/webpack/webpack-base-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module.exports = function createBaseConfig(env) {
const browserslistDefaults = ['> 0.25%', 'IE >= 9'];
const browserlistConfig = Object(browserslist.findConfig(cwd));
const browsers =
env.browserslist ||
(isProd ? browserlistConfig.production : browserlistConfig.development) ||
browserlistConfig.defaults ||
browserslistDefaults;
Expand Down