fix(compiler-ssr): avoid duplicated asset imports merged from component slot client branch
fix vitejs/vite#2034
This commit is contained in:
@@ -89,7 +89,7 @@ export interface TransformContext
|
||||
components: Set<string>
|
||||
directives: Set<string>
|
||||
hoists: (JSChildNode | null)[]
|
||||
imports: Set<ImportItem>
|
||||
imports: ImportItem[]
|
||||
temps: number
|
||||
cached: number
|
||||
identifiers: { [name: string]: number | undefined }
|
||||
@@ -163,7 +163,7 @@ export function createTransformContext(
|
||||
components: new Set(),
|
||||
directives: new Set(),
|
||||
hoists: [],
|
||||
imports: new Set(),
|
||||
imports: [],
|
||||
constantCache: new Map(),
|
||||
temps: 0,
|
||||
cached: 0,
|
||||
@@ -293,7 +293,7 @@ export function transform(root: RootNode, options: TransformOptions) {
|
||||
root.helpers = [...context.helpers]
|
||||
root.components = [...context.components]
|
||||
root.directives = [...context.directives]
|
||||
root.imports = [...context.imports]
|
||||
root.imports = context.imports
|
||||
root.hoists = context.hoists
|
||||
root.temps = context.temps
|
||||
root.cached = context.cached
|
||||
|
||||
Reference in New Issue
Block a user