From 80990ebe60023266cc9c9e5e5b0b9af81612b4f7 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Fri, 13 Oct 2023 10:08:06 -0700 Subject: [PATCH] fix: ssr bundled Marko files in build mode --- .changeset/fair-peas-impress.md | 5 +++++ src/index.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/fair-peas-impress.md diff --git a/.changeset/fair-peas-impress.md b/.changeset/fair-peas-impress.md new file mode 100644 index 0000000..c17ab8e --- /dev/null +++ b/.changeset/fair-peas-impress.md @@ -0,0 +1,5 @@ +--- +"@marko/vite": patch +--- + +Fix regression which prevented SSR cjs Marko files from being properly bundled. diff --git a/src/index.ts b/src/index.ts index 57b66ce..b1fbaa8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -534,6 +534,7 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] { if (!query) { if ( + !isBuild && /[\\/]node_modules[\\/]/.test(id) && getModuleType(id) === "cjs" ) {