Fix: add "CSS" to noExternal hint (#3426)
* chore: add "CSS" to noExternal hint * chore: changeset
This commit is contained in:
parent
4e3b405e9e
commit
946630a112
2 changed files with 6 additions and 1 deletions
5
.changeset/blue-bottles-explode.md
Normal file
5
.changeset/blue-bottles-explode.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Logs: Add "ssr.noExternal" hint for CSS loaded from npm packages
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue