Skip to content

Commit

Permalink
fix(transformer): 小程序会把 false 渲染出来,#1812
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed Jan 7, 2019
1 parent ced2dcf commit 4508763
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/taro-transformer-wx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"babel-helper-mark-eval-scopes": "^0.4.3",
"babel-helper-remove-or-void": "^0.4.3",
"babel-plugin-danger-remove-unused-import": "^1.1.1",
"babel-plugin-remove-dead-code": "^1.3.2",
"babel-plugin-minify-dead-code": "^0.5.2",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-define": "^1.3.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-transformer-wx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ export default function transform (options: Options): TransformResult {
plugins: [
require('babel-plugin-transform-flow-strip-types'),
[require('babel-plugin-transform-define').default, options.env]
].concat(process.env.ESLINT === 'false' || options.isNormal || options.isTyped ? [] : eslintValidation).concat((process.env.NODE_ENV === 'test') ? [] : require('babel-plugin-remove-dead-code').default)
].concat(process.env.ESLINT === 'false' || options.isNormal || options.isTyped ? [] : eslintValidation)
.concat((process.env.NODE_ENV === 'test') ? [] : require('babel-plugin-minify-dead-code'))
}).ast as t.File
if (options.isNormal) {
return { ast } as any
Expand Down

0 comments on commit 4508763

Please sign in to comment.