Skip to content

Commit d5eda2a

Browse files
committed
fix: css chunk meta
1 parent 57eb1a1 commit d5eda2a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/vite/src/node/plugins/css.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
929929
// chunks instead.
930930
chunk.imports = chunk.imports.filter((file) => {
931931
if (pureCssChunkNames.includes(file)) {
932-
const { importedCss, importedAssets } = getChunkMetadata((bundle[file] as OutputChunk).fileName)!
932+
const { importedCss, importedAssets } = getChunkMetadata((bundle[file] as OutputChunk).name)!
933933
importedCss.forEach((file) =>
934934
getChunkMetadata(chunk.name)!.importedCss.add(file),
935935
)

packages/vite/src/node/server/pluginContainer.ts

-2
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ class PluginContext implements Omit<RollupPluginContext, 'cache'> {
521521
return this._container.getModuleInfo(id)
522522
}
523523

524-
// @ts-expect-error
525524
async resolve(
526525
id: string,
527526
importer?: string,
@@ -794,7 +793,6 @@ class LoadPluginContext extends PluginContext {
794793
}
795794
}
796795

797-
// @ts-expect-error
798796
class TransformPluginContext
799797
extends LoadPluginContext
800798
implements Omit<RollupTransformPluginContext, 'cache'>

0 commit comments

Comments
 (0)