From d5fe7ef959085bbd361cf2cbd6c6b81547d9e92f Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Fri, 25 Oct 2024 09:32:08 -0700 Subject: [PATCH] fix: set same marko linked config in all compiler options (#155) --- .changeset/cyan-peaches-drive.md | 5 +++++ src/index.ts | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/cyan-peaches-drive.md diff --git a/.changeset/cyan-peaches-drive.md b/.changeset/cyan-peaches-drive.md new file mode 100644 index 0000000..ebea00d --- /dev/null +++ b/.changeset/cyan-peaches-drive.md @@ -0,0 +1,5 @@ +--- +"@marko/vite": patch +--- + +Fixes a caching regression caused by having a different SSR config compared to the rest of the configs and using that in a transform (which is cached). diff --git a/src/index.ts b/src/index.ts index c907127..982fb6d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -216,16 +216,16 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] { }, }; + if (linked) { + (baseConfig as any).markoViteLinked = linked; + } + ssrConfig = { ...baseConfig, resolveVirtualDependency, output: "html", }; - if (linked) { - (ssrConfig as any).markoViteLinked = linked; - } - domConfig = { ...baseConfig, resolveVirtualDependency,