Open StringKe opened 2 months ago
Failed to resolve module specifier "pathe". Relative references must start with either "/", "./", or "../".
https://github.com/nksaraf/vinxi/blob/main/packages/vinxi/lib/path.js
Regarding this error I did not encounter it after I pulled vinxi locally and added my code to exmaples as a subproject.
I'm running into this issue as well. Here is a repro for a vue ssr app. https://stackblitz.com/edit/vitejs-vite-flukcx?file=vite.config.ts Interestingly a nearly identical setup in just spa mode works just fine. https://stackblitz.com/edit/github-ewxdpx?file=app.config.js
I've found a workaround but I'm not sure what the ramifications of it would be.
Add the vinxi config plugin import to your vinxi config file:
import { config } from 'vinxi/plugins/config';
in the client route under the vite plugins section add the config plugin like so:
plugins: () => [
config('custom', {
define: {
__DEFINES__: '{}',
},
}),
...// the rest of your plugins
]
I'm wrapping up a tanstack-router based ssr framework (similar to nextjs)
Currently the javascript is not loading correctly in the browser (mine-type error or vite error)
repo: https://github.com/StringKe/qingmu
A guess about this error: the import in entry.client.tsx was not processed by vite and the content was returned uncompiled.