8000 remove babel-preset polyfill configure by Luncher · Pull Request #122 · qiniu/builder · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

remove babel-preset polyfill configure #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
11 changes: 0 additions & 11 deletions lib/webpack-config/addons/add-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,7 @@ const makeBabelLoaderOptions = (options, targets, { addPolyfill }) => {
const plugins = options.plugins || []

const babelPresetEnvName = '@babel/preset-env'
const presetPolyfillOptions = {
useBuiltIns: 'entry',
// corejs 选项在 @babel/preset-env 7.4.0 之后可用;
// 若 @babel/preset-env 版本 >= 7.4.0,则此处需要显式指定版本为 2
corejs: 2,
}
const defaultBabelPresetEnv = [babelPresetEnvName, {
...(
addPolyfill && buildEnv.get() === buildEnv.prod
? presetPolyfillOptions
: null
),
modules: false,
targets
}]
Expand Down
0