Rollup cannot resolve JSX/TSX files #2392
igorjacauna
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was using
react
andreact-dom
as render-engine and facing this problem when Rollup try to resolve a JSX/TSX import in my nitro app:RollupError: Could not resolve "./../components/MyComponent" from "src/server/routes/page.tsx"
The path for MyComponent is correct.
My guess is that we need add
.jsx
and.tsx
to extensions array in this lineI changed it in
node_modules/nitropack/dist/nitro.mjs
, adding.jsx
and.tsx
to extendions, and it worked, Rollup resolved correctly the TSX fileAm I correct? I can open a PR if this is ok
Beta Was this translation helpful? Give feedback.
All reactions