@@ -9,13 +9,15 @@ import type { AppConfig, PageConfig } from '../index'
9
9
10
10
export interface ViteNativeCompMeta {
11
11
name : string
12
+ exportName : string
12
13
scriptPath : string
13
14
configPath : string
14
15
config : PageConfig
15
16
isNative : true
16
17
templatePath : string
17
18
cssPath ?: string
18
19
isPackage ?: boolean
20
+ isGenerated ?: boolean
19
21
}
20
22
21
23
export interface ViteFileType {
@@ -109,6 +111,7 @@ export interface ViteCompilerContext<T> {
109
111
configFileList : string [ ]
110
112
compilePage : ( pageName : string ) => VitePageMeta
111
113
watchConfigFile : ( rollupCtx : PluginContext ) => void
114
+ collectedDeps : ( rollupCtx : PluginContext , id : string , filter , cache : Set < string > = new Set ( ) ) => Promise < Set < string > >
112
115
getAppScriptPath : ( ) => string
113
116
getApp : ( ) => ViteAppMeta
114
117
getPages : ( ) => VitePageMeta [ ]
@@ -140,7 +143,9 @@ export interface ViteHarmonyCompilerContext extends ViteCompilerContext<ViteHarm
140
143
getCommonChunks : ( ) => string [ ]
141
144
modifyHarmonyConfig : ( config : Partial < AppConfig > ) => void
142
145
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
144
149
getScriptPath : ( filePath : string ) => string
145
150
getStylePath : ( filePath : string ) => string
146
151
getConfigPath : ( filePath : string ) => string
@@ -151,7 +156,9 @@ export interface ViteMiniCompilerContext extends ViteCompilerContext<ViteMiniBui
151
156
commonChunks : string [ ]
152
157
nativeComponents : Map < string , ViteNativeCompMeta >
153
158
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
155
162
getScriptPath : ( filePath : string ) => string
156
163
getTemplatePath : ( filePath : string ) => string
157
164
getStylePath : ( filePath : string ) => string
0 commit comments