-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@sveltejs/kit
and vite@3
in typescript monorepo fails with ERR_UNKNOWN_FILE_EXTENSION
#5542
Comments
sveltekit
and vite@3 in typescript monorepo fails with ERR_UNKNOWN_FILE_EXTENSION
@sveltejs/kit
and vite@3
in typescript monorepo fails with ERR_UNKNOWN_FILE_EXTENSION
I saw on Discord 3 people with this issue. It really seems to be bug in kit or vite. |
@ifiokjr I would guess this is caused by Vite / Node.js and there's really nothing we can do about it in SvelteKit. The plain Vite example you have does not use SSR and that's probably why you're not encountering it there. Could you also try an example that uses Vite with SSR and without SvelteKit? https://github.com/sveltejs/kit#bug-reporting I would guess that would break and then you should file this in the Vite repo instead |
adding another two errors from Discord:
(still waiting for second error) |
@benmccann I think you're right about this being an upstream issue. As a temporary workaround setting your vite config to the following allows it to build. // vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
+ legacy: { buildSsrCjsExternalHeuristics: true },
}); I found it in the migration guide. https://vitejs.dev/guide/migration.html#ssr-changes |
This is a bug in Vite. Submitted vitejs/vite#9296 to fix it. |
Closing as Vite 3.0.3 has been released. |
Describe the bug
A
pnpm
monorepo with symlinked TypeScript packages during development fails with the messageERR_UNKNOWN_FILE_EXTENSION
.@sveltejs/vite-plugin-svelte
works fine. Things only break with thekit()
plugin from the@sveltejs/kit/vite
endpoint.Reproduction
Here is a minimal(ish) reproduction: https://github.com/ifiokjr/vite3-unknown-file-extension
The readme describes where the error occurs, along with an example of
vite
handling the typescript package files correctly without@sveltejs/kit
.Logs
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: