summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/blue-bottles-explode.md5
-rw-r--r--packages/astro/src/core/errors.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/blue-bottles-explode.md b/.changeset/blue-bottles-explode.md
new file mode 100644
index 000000000..d6858d3c1
--- /dev/null
+++ b/.changeset/blue-bottles-explode.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Logs: Add "ssr.noExternal" hint for CSS loaded from npm packages
diff --git a/packages/astro/src/core/errors.ts b/packages/astro/src/core/errors.ts
index 35893bb9a..436e0004b 100644
--- a/packages/astro/src/core/errors.ts
+++ b/packages/astro/src/core/errors.ts
@@ -47,7 +47,7 @@ const incompatiblePackages = {
const incompatPackageExp = new RegExp(`(${Object.keys(incompatiblePackages).join('|')})`);
function generateHint(err: ErrorWithMetadata): string | undefined {
- if (/Unknown file extension \"\.(jsx|vue|svelte|astro)\" for /.test(err.message)) {
+ if (/Unknown file extension \"\.(jsx|vue|svelte|astro|css)\" for /.test(err.message)) {
return 'You likely need to add this package to `vite.ssr.noExternal` in your astro config file.';
} else {
const res = incompatPackageExp.exec(err.stack);