From c745546de1e30f8938f165e06364cc900e9fc535 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Wed, 10 Jul 2024 14:03:44 -0700 Subject: [PATCH] fix missing null check on css exclusion --- .changeset/sour-suits-fail.md | 5 +++++ packages/vinxi/lib/manifest/collect-styles.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/sour-suits-fail.md diff --git a/.changeset/sour-suits-fail.md b/.changeset/sour-suits-fail.md new file mode 100644 index 00000000..deca0e65 --- /dev/null +++ b/.changeset/sour-suits-fail.md @@ -0,0 +1,5 @@ +--- +"vinxi": patch +--- + +fix missing null check on css exclusion diff --git a/packages/vinxi/lib/manifest/collect-styles.js b/packages/vinxi/lib/manifest/collect-styles.js index d86f74c8..64efce59 100644 --- a/packages/vinxi/lib/manifest/collect-styles.js +++ b/packages/vinxi/lib/manifest/collect-styles.js @@ -100,7 +100,7 @@ async function findDeps(vite, node, deps, ssr) { if ( node.url.endsWith(".css") || - node.transformResult?.map?.sourcesContent.some((code) => code.match(IGNORE_COMMENT_REGEXP)) + node.transformResult?.map?.sourcesContent?.some((code) => code.match(IGNORE_COMMENT_REGEXP)) ) { return; }