Skip to content

Commit

Permalink
fix(mini-runner): 修复引用原生组件报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 31, 2019
1 parent 09dd6b7 commit 03967de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export default class MiniPlugin {
let componentRealPath: string | null = null
let importExportName
const { isTaroComponent, transformResult } = isFileToBeTaroComponent(code, component.path as string, adapter)
if (isTaroComponent) {
const isNativePageOrComponent = this.isNativePageOrComponent(this.getTemplatePath(component.path), fs.readFileSync(component.path).toString())
if (isTaroComponent || isNativePageOrComponent) {
return component.path
}
const componentName = component.name!.split('|')[1] || component.name
Expand Down

0 comments on commit 03967de

Please sign in to comment.