diff options
-rw-r--r-- | .changeset/famous-icons-pull.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/create-vite.ts | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/.changeset/famous-icons-pull.md b/.changeset/famous-icons-pull.md new file mode 100644 index 000000000..ffbdc851e --- /dev/null +++ b/.changeset/famous-icons-pull.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix: add @nanostores/preact to ALWAYS_NOEXTERNAL list for easier onboarding diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 7c447aadf..0d3e789a1 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -28,7 +28,11 @@ const ALWAYS_EXTERNAL = new Set([ 'whatwg-url', ]); const ALWAYS_NOEXTERNAL = new Set([ - 'astro', // This is only because Vite's native ESM doesn't resolve "exports" correctly. + // This is only because Vite's native ESM doesn't resolve "exports" correctly. + 'astro', + // Handle recommended nanostores. Only @nanostores/preact is required from our testing! + // Full explanation and related bug report: https://github.com/withastro/astro/pull/3667 + '@nanostores/preact', ]); // note: ssr is still an experimental API hence the type omission from `vite` |