Skip to content

Commit

Permalink
support chunking in new build system
Browse files Browse the repository at this point in the history
  • Loading branch information
terrablue committed Jul 27, 2024
1 parent 7f5efc3 commit 92edfa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/build/targets/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default async app => {
.map(async file => `${file}`.replace(`${d}/`, _ => "")));
const pages_str = pages.map(page =>
`"${page}": await File.text("./${location.pages}/${page}"),`).join("\n");
console.log($imports)

const assets_scripts = `
import { File } from "rcompat/fs";
Expand All @@ -48,7 +49,7 @@ export default async app => {
const imports = {
app: File.join("${http.static.root}", "${$imports.find($import =>
$import.src.endsWith(".js")).src}").webpath(),
$import.src.includes("app") && $import.src.endsWith(".js")).src}").webpath(),
};
// importmap
assets.push({
Expand Down
2 changes: 1 addition & 1 deletion packages/native/src/targets/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default async app => {
${app_js === undefined ? "" :
`const imports = {
app: join("${http.static.root}", "${$imports.find($import =>
$import.src.endsWith(".js")).src}").webpath(),
$import.src.includes("app") && $import.src.endsWith(".js")).src}").webpath(),
};
// importmap
assets.push({
Expand Down

0 comments on commit 92edfa1

Please sign in to comment.