diff options
author | 2022-05-24 12:43:07 -0400 | |
---|---|---|
committer | 2022-05-24 11:43:07 -0500 | |
commit | 946630a112dca39d6afc32ef02edceda94a604cb (patch) | |
tree | b09e2014cf0e6e94cbfc555c5c335d59927c5bad | |
parent | 4e3b405e9eb03f7c286234a30ca45c26e3e17fcf (diff) | |
download | astro-946630a112dca39d6afc32ef02edceda94a604cb.tar.gz astro-946630a112dca39d6afc32ef02edceda94a604cb.tar.zst astro-946630a112dca39d6afc32ef02edceda94a604cb.zip |
Fix: add "CSS" to noExternal hint (#3426)
* chore: add "CSS" to noExternal hint
* chore: changeset
-rw-r--r-- | .changeset/blue-bottles-explode.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/errors.ts | 2 |
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); |