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 16, 2019
1 parent f5fdd3e commit 481edd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-mini-runner/src/loaders/fileParseLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function processAst (
if (buildAdapter === BUILD_TYPES.WEAPP || buildAdapter === BUILD_TYPES.QQ) {
node.body.push(template(`Component(require('${taroMiniAppFramework}').default.createComponent(${exportVariableName}, true))`, babylonConfig as any)() as any)
} else if (isQuickApp) {
const pagePath = sourceFilePath.replace(sourceDir, '').replace(/\\/, '/').replace(path.extname(sourceFilePath), '')
const pagePath = sourceFilePath.replace(sourceDir, '').replace(/\\/g, '/').replace(path.extname(sourceFilePath), '')
if (!taroImportDefaultName) {
node.body.unshift(
template(`import Taro from '${taroMiniAppFramework}'`, babylonConfig as any)() as any
Expand Down

0 comments on commit 481edd4

Please sign in to comment.