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
Vite: custom tsconfig paths are not respected when I pass getLoadContext to the Cloudflare Proxy plugin #9171
Comments
It would be useful to see your full tsconfig.json and package.json. |
I faced the same problem. I think this is due to the fact that vite does not allow the use of tsconfig paths in vite.config.ts |
@jebenois tsconfig.json:
package.json
|
any update on this? I can't use paths. |
Here are a couple workarounds for this.
// package.json
"build": "remix vite:build",
"start": "wrangler pages dev ./build/client",
"preview": "npm run build && npm run start",
"dev": "nodemon --watch ./app/** --watch ./load-context.ts --ext js,json,ts,tsx --exec \"npm run preview\"",
|
Reproduction
According to the docs i have to pass getLoadContext to remix
I have a path setting in the tsconfig.json
This is my vite.config.ts:
System Info
Used Package Manager
pnpm
Expected Behavior
custom paths must be respected when I pass getLoadContext to the Cloudflare Proxy plugin
Actual Behavior
i got error:
"Error [ERR_MODULE_NOT_FOUND]: Cannot find package '~' imported from ..."
The text was updated successfully, but these errors were encountered: