Skip to content

Commit

Permalink
fix(h5): custom define-constants fix #13286 (#13292)
Browse files Browse the repository at this point in the history
* fix(h5): custom define-constants fix #13286
---------

Co-authored-by: AzuFF <47267778+heiazu@users.noreply.github.com>
Co-authored-by: zhuminghui2 <zhuminghui2@jd.com>
  • Loading branch information
3 people authored Feb 24, 2023
1 parent d9acf1b commit c50f63f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/taro-platform-h5/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ export default (ctx: IPluginContext) => {
})

ctx.modifyRunnerOpts(({ opts }) => {
opts.defineConstants = {
USE_HTML_COMPONENTS: JSON.stringify(!!opts.useHtmlComponents),
}
opts.defineConstants ||= {}
opts.defineConstants.USE_HTML_COMPONENTS = JSON.stringify(!!opts.useHtmlComponents)
// TODO 为 postcss-html-transform 更新组件转换列表
})
}
Expand Down

0 comments on commit c50f63f

Please sign in to comment.