feat: add plugin configResolved (#2055)

This commit is contained in:
Marvin Hagemeister
2023-11-21 15:39:17 +01:00
committed by GitHub
parent 0a85a1fe5f
commit daf15aee6f
15 changed files with 134 additions and 1 deletions
+8 -1
View File
@@ -290,13 +290,20 @@ export async function withFakeServe(
) {
const fixture = join(Deno.cwd(), name);
const dev = basename(name) === "dev.ts";
if (dev) {
try {
await Deno.remove(join(fixture, "_fresh"));
} catch (_err) {
// ignore
}
}
const manifestPath = toFileUrl(join(dirname(fixture), "fresh.gen.ts")).href;
const manifestMod = await import(manifestPath);
const configPath = join(dirname(fixture), "fresh.config.ts");
let config = { dev };
let config: FromManifestConfig = { dev };
// For now we load config on a case by case basis, because something in
// twind (unsure) doesn't work well if multiple instances are running