Skip to content

Commit

Permalink
chore(package): restore babel option modules: false for ESM builds (#…
Browse files Browse the repository at this point in the history
…2663)

* build: restore babel option `modules: false` for webpack's tree shaking

this closes #2661

* Update preset-env.js
  • Loading branch information
thetric authored and layershifter committed Mar 20, 2018
1 parent c3ee266 commit aa0f7a6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build/preset-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ const browsers = [
'not ie_mob <= 11',
]

const envOptions = {
targets: { browsers },
}
if (env === 'build-es') envOptions.modules = false

module.exports = {
presets: [['env', {
targets: { browsers },
}]],
presets: [['env', envOptions]],
plugins,
}

0 comments on commit aa0f7a6

Please sign in to comment.