diff --git a/.changeset/violet-pans-jump.md b/.changeset/violet-pans-jump.md new file mode 100644 index 000000000000..a36d9d313282 --- /dev/null +++ b/.changeset/violet-pans-jump.md @@ -0,0 +1,6 @@ +--- +'@modern-js/runtime': patch +--- + +fix: style assets should be add to cssChunk +fix: style 应该被添加到 cssChunks diff --git a/packages/runtime/plugin-runtime/src/core/server/string/loadable.ts b/packages/runtime/plugin-runtime/src/core/server/string/loadable.ts index 19568449fcec..fddfac974d1d 100644 --- a/packages/runtime/plugin-runtime/src/core/server/string/loadable.ts +++ b/packages/runtime/plugin-runtime/src/core/server/string/loadable.ts @@ -216,7 +216,7 @@ export class LoadableCollector implements Collector { ); // filter empty string; - chunkSet.jsChunk += css.filter(css => Boolean(css)).join(''); + chunkSet.cssChunk += css.filter(css => Boolean(css)).join(''); } private generateAttributes(