@@ -9,13 +9,15 @@ import type { AppConfig, PageConfig } from '../index'
99
1010export interface ViteNativeCompMeta {
1111 name : string
12+ exportName : string
1213 scriptPath : string
1314 configPath : string
1415 config : PageConfig
1516 isNative : true
1617 templatePath : string
1718 cssPath ?: string
1819 isPackage ?: boolean
20+ isGenerated ?: boolean
1921}
2022
2123export interface ViteFileType {
@@ -109,6 +111,7 @@ export interface ViteCompilerContext<T> {
109111 configFileList : string [ ]
110112 compilePage : ( pageName : string ) => VitePageMeta
111113 watchConfigFile : ( rollupCtx : PluginContext ) => void
114+ collectedDeps : ( rollupCtx : PluginContext , id : string , filter , cache : Set < string > = new Set ( ) ) => Promise < Set < string > >
112115 getAppScriptPath : ( ) => string
113116 getApp : ( ) => ViteAppMeta
114117 getPages : ( ) => VitePageMeta [ ]
@@ -140,7 +143,9 @@ export interface ViteHarmonyCompilerContext extends ViteCompilerContext<ViteHarm
140143 getCommonChunks : ( ) => string [ ]
141144 modifyHarmonyConfig : ( config : Partial < AppConfig > ) => void
142145 modifyHostPackage : ( deps ?: Record < string , string > , devDeps ?: Record < string , string > ) => Exclude < IHarmonyConfig [ 'ohPackage' ] , void >
143- collectNativeComponents : ( meta : ViteAppMeta | VitePageMeta | ViteNativeCompMeta ) => void
146+ resolvePageImportPath : ( scriptPath : string , pageName : string ) => string
147+ collectNativeComponents : ( meta : ViteAppMeta | VitePageMeta | ViteNativeCompMeta ) => ViteNativeCompMeta [ ]
148+ generateNativeComponent : ( rollupCtx : PluginContext , meta : ViteNativeCompMeta , implicitlyLoadedAfterOneOf : string [ ] = [ ] ) => void
144149 getScriptPath : ( filePath : string ) => string
145150 getStylePath : ( filePath : string ) => string
146151 getConfigPath : ( filePath : string ) => string
@@ -151,7 +156,9 @@ export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBui
151156 commonChunks : string [ ]
152157 nativeComponents : Map < string , ViteNativeCompMeta >
153158 getCommonChunks : ( ) => string [ ]
154- collectNativeComponents : ( meta : ViteAppMeta | VitePageMeta | ViteNativeCompMeta ) => void
159+ resolvePageImportPath : ( scriptPath : string , pageName : string ) => string
160+ collectNativeComponents : ( meta : ViteAppMeta | VitePageMeta | ViteNativeCompMeta ) => ViteNativeCompMeta [ ]
161+ generateNativeComponent : ( rollupCtx : PluginContext , meta : ViteNativeCompMeta , implicitlyLoadedAfterOneOf : string [ ] = [ ] ) => void
155162 getScriptPath : ( filePath : string ) => string
156163 getTemplatePath : ( filePath : string ) => string
157164 getStylePath : ( filePath : string ) => string
0 commit comments