release: WRNexusJS 0.2.49
This commit is contained in:
@@ -61,10 +61,16 @@ export async function runBuild(appRoot: string): Promise<void> {
|
|||||||
// `.wrn` route files are compiled to `.ts` so Bun.build can bundle them.
|
// `.wrn` route files are compiled to `.ts` so Bun.build can bundle them.
|
||||||
let compiledCount = 0;
|
let compiledCount = 0;
|
||||||
const importPathFor = (file: string): string => {
|
const importPathFor = (file: string): string => {
|
||||||
if (!file.endsWith(".wrn")) return fwd(file);
|
if (!file.endsWith(".wrn")) {
|
||||||
const ts = compileWireFile(readFileSync(file, "utf8"));
|
return fwd(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
const ts = compileWireFile(readFileSync(file, "utf8"), file);
|
||||||
|
|
||||||
const out = join(compiledDir, `route${compiledCount++}.ts`);
|
const out = join(compiledDir, `route${compiledCount++}.ts`);
|
||||||
|
|
||||||
writeFileSync(out, ts, "utf8");
|
writeFileSync(out, ts, "utf8");
|
||||||
|
|
||||||
return fwd(out);
|
return fwd(out);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user