Skip to content

Commit

Permalink
fix: 修复isPure传参路径
Browse files Browse the repository at this point in the history
  • Loading branch information
mayintao3 committed May 16, 2024
1 parent 36794a9 commit 779c0a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/taro-platform-harmony/src/program/harmony.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export abstract class TaroPlatformHarmony<T extends TConfig = TConfig> extends T
platformType: this.platformType,
useETS: this.useETS,
useJSON5: this.useJSON5,
isPure: Boolean(ctx?.runOpts?.options?.args?.pure),
...extraOptions
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-vite-runner/src/harmony/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export default function (viteCompilerContext: ViteHarmonyCompilerContext): Plugi
},
load (id) {
if (!viteCompilerContext) return
const { taroConfig, cwd: appPath, app, loaderMeta, isPure } = viteCompilerContext
const { taroConfig, cwd: appPath, app, loaderMeta } = viteCompilerContext
const appConfig = app.config
const { sourceRoot = 'src' } = taroConfig
const appRoot = path.resolve(appPath, sourceRoot)
const parse = new PageParser(appPath, appConfig, taroConfig, loaderMeta, isPure)
const parse = new PageParser(appPath, appConfig, taroConfig, loaderMeta, taroConfig.isPure)
const tabbarList = appConfig.tabBar?.list || []
const rawId = stripVirtualModulePrefix(id).replace(PAGE_SUFFIX, '')

Expand Down
2 changes: 1 addition & 1 deletion packages/taro/types/compile/viteCompilerContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export interface ViteHarmonyBuildConfig extends CommonBuildConfig, IHarmonyConfi
useJSON5?: boolean
blended?: boolean
runtimePath?: string | string[]
isPure?: boolean
taroComponentsPath: string
}

Expand Down Expand Up @@ -105,7 +106,6 @@ export interface ViteCompilerContext<T> {
logger
filesConfig: IMiniFilesConfig
configFileList: string[]
isPure?: boolean
compilePage: (pageName: string) => VitePageMeta
watchConfigFile: (rollupCtx: PluginContext) => void
getAppScriptPath: () => string
Expand Down

0 comments on commit 779c0a6

Please sign in to comment.