Skip to content

Commit

Permalink
Attempt to prevent regenerator compilation in SW
Browse files Browse the repository at this point in the history
  • Loading branch information
developit authored Nov 19, 2021
1 parent 2e18aae commit 10e234e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/cli/lib/lib/webpack/webpack-base-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module.exports = function createBaseConfig(env) {

module: {
rules: [
{
(info) => ({
// ES2015
enforce: 'pre',
test: /\.m?[jt]sx?$/,
Expand All @@ -183,10 +183,14 @@ module.exports = function createBaseConfig(env) {
loader: require.resolve('babel-loader'),
options: Object.assign(
{ babelrc: false },
createBabelConfig(env, { browsers }),
createBabelConfig(env, {
browsers: info.compiler.name === 'InjectManifest'
? 'supports es6-module'
: browsers
}),
babelrc // intentionally overwrite our settings
),
},
}),
{
// LESS
enforce: 'pre',
Expand Down

0 comments on commit 10e234e

Please sign in to comment.