Skip to content

Commit

Permalink
fix(harmony): 对齐 page 各生命周期中使用的对象实例
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Aug 20, 2024
1 parent 5ff77a8 commit ebc82ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/taro-vite-runner/src/harmony/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ export default function (viteCompilerContext: ViteHarmonyCompilerContext): Plugi
pageName = 'index'
}

const page_ = page as TaroHarmonyPageMeta
page_.id = id
page_.originName = page.name
page_.name = pageName

this.emitFile({
type: 'prebuilt-chunk',
fileName: viteCompilerContext.getTargetFilePath(pageName, '.ets'),
code: parse.parse(path.resolve(appRoot, pageName), {
...page,
originName: page.name,
name: pageName,
id,
} as TaroHarmonyPageMeta, name, this.resolve),
code: parse.parse(path.resolve(appRoot, pageName), page_, name, this.resolve),
exports: ['default'],
})
})
Expand Down

0 comments on commit ebc82ee

Please sign in to comment.