Skip to content

Commit

Permalink
fix(transformer): 修复 0945248 重复添加插件
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jul 10, 2019
1 parent 951d241 commit 2b8180b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/taro-transformer-wx/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const buildBabelTransformOptions: () => TransformOptions = () => {
require('babel-plugin-transform-do-expressions'),
require('babel-plugin-transform-export-extensions'),
require('babel-plugin-transform-flow-strip-types'),
buildVistor(),
functionalComponent,
[require('babel-plugin-transform-define').default, transformOptions.env]
]
if (!transformOptions.isNormal) {
Expand All @@ -62,7 +60,8 @@ export const buildBabelTransformOptions: () => TransformOptions = () => {
'exportExtensions'
] as any[]
},
plugins: plugins.concat(process.env.ESLINT === 'false' || transformOptions.isNormal || transformOptions.isTyped ? [] : eslintValidation)
.concat((isTestEnv) ? [] : require('babel-plugin-remove-dead-code').default)
plugins: plugins
.concat(process.env.ESLINT === 'false' || transformOptions.isNormal || transformOptions.isTyped ? [] : eslintValidation)
.concat((isTestEnv) ? [] : require('babel-plugin-remove-dead-code').default)
}
}

0 comments on commit 2b8180b

Please sign in to comment.