Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Dec 21, 2022
1 parent cf3e889 commit 42744f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
2 changes: 1 addition & 1 deletion crates/next-core/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@vercel/turbopack-runtime": "latest",
"anser": "^2.1.1",
"css.escape": "^1.5.1",
"next": "^13.0.6",
"next": "^13.0.8-canary.2",
"platform": "1.3.6",
"react-dom": "^18.2.0",
"react": "^18.2.0",
Expand Down
9 changes: 5 additions & 4 deletions crates/next-core/js/src/entry/app-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,24 @@ async function runOperation(renderData: RenderData) {
if (name === "__ssr_module_mapping__") {
return manifest;
}
if (name === "__client_css_manifest__") {
return {};
if (name === "__entry_css_files__") {
return {
page: layoutInfoChunks["page.js"],
};
}
return new Proxy({}, proxyMethodsForModule(name as string, css));
},
};
};
const manifest: FlightManifest = new Proxy({} as any, proxyMethods(false));
const serverCSSManifest: FlightCSSManifest = {};
serverCSSManifest.__entry_css__ = {};
for (const [key, chunks] of Object.entries(layoutInfoChunks)) {
const cssChunks = chunks.filter((path) => path.endsWith(".css"));
serverCSSManifest[key] = cssChunks.map((chunk) =>
JSON.stringify([chunk, [chunk]])
);
}
serverCSSManifest.__entry_css__ = {
serverCSSManifest.__entry_css_mods__ = {
page: serverCSSManifest["page.js"],
};
const req: IncomingMessage = {
Expand Down
20 changes: 2 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 42744f3

Please sign in to comment.