feat: remove MODE global (#2483)

This commit is contained in:
Marvin Hagemeister
2024-06-03 16:54:37 +02:00
committed by GitHub
parent aa19b393e7
commit e007597ff3
5 changed files with 60 additions and 61 deletions
+6 -1
View File
@@ -70,6 +70,8 @@ export class Builder implements FreshBuilder {
.use(devErrorOverlay())
.mountApp("*", app);
devApp.config.mode = "development";
setBuildCache(
devApp,
new MemoryBuildCache(
@@ -97,6 +99,7 @@ export class Builder implements FreshBuilder {
this.#options.target,
),
);
return await this.#build(app, false);
}
@@ -117,7 +120,9 @@ export class Builder implements FreshBuilder {
// Ignore
}
const buildCache = getBuildCache(app)! as MemoryBuildCache | DiskBuildCache;
const buildCache = getBuildCache(app)! as
| MemoryBuildCache
| DiskBuildCache;
const runtimePath = dev
? "../runtime/client/dev.ts"