Skip to content

Commit

Permalink
fix(babel-preset-app): respect explicit options.targets for modern pr…
Browse files Browse the repository at this point in the history
…eset
  • Loading branch information
clarkdo committed May 26, 2021
1 parent b116d0d commit 06a07c5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/babel-preset-app/src/index.js
Expand Up @@ -97,12 +97,7 @@ module.exports = (api, options = {}) => {
modern: { esmodules: true }
}

let { targets = defaultTargets[envName] } = options

// modern mode can only be { esmodules: true }
if (envName === 'modern') {
targets = defaultTargets.modern
}
const { targets = defaultTargets[envName] } = options

const polyfills = []

Expand Down

0 comments on commit 06a07c5

Please sign in to comment.