Skip to content

Commit

Permalink
fix: ve-plugin for SSR - lose HMR tho
Browse files Browse the repository at this point in the history
  • Loading branch information
astahmer committed Dec 7, 2022
1 parent de0a682 commit acaf592
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ve-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,20 @@ export function vanillaExtractPlugin({
filePath: validId,
identOption,
serializeVirtualCssPath: async ({ fileScope, source }) => {
const rootRelativeId = `${fileScope.filePath}${
const buggyRootRelativeId = `${fileScope.filePath}${
config.command === "build" || (ssr && forceEmitCssInSsrBuild)
? virtualExtCss
: virtualExtJs
}`;
const rootRelativeId = `${fileScope.filePath}${virtualExtCss}`;
const absoluteId = getAbsoluteVirtualFileId(rootRelativeId);
console.log({
rootRelativeId,
buggyRootRelativeId,
ssr,
forceEmitCssInSsrBuild,
command: config.command,
});

let cssSource = source;

Expand Down

0 comments on commit acaf592

Please sign in to comment.