You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Could not resolve './ComponentC' from src/ComponentB.jsx
When import JSX file from JSX file with than 2 levels deep, eg
index.ts -> A.jsx -> B.jsx -> C.jsx
# Error: Could not resolve './C' from src/B.jsx
index.ts -> A.js -> B.jsx
# Error: Could not resolve './B' from src/A.js
index.js -> A.jsx
# Error: Could not resolve './A' from src/index.js
I don't really know what is the root cause of this, but trying to set extensions: ['.mjs', '.js', '.jsx', '.json', '.node'] to @rollup/plugin-node-resolve seems to solve the issue.
Current Behavior
Encounter an error
When import JSX file from JSX file with than 2 levels deep, eg
Below is working fine
Repo for reproducing
Expected behavior
The build command should be successfully
Suggested solution(s)
I don't really know what is the root cause of this, but trying to set
extensions: ['.mjs', '.js', '.jsx', '.json', '.node']
to@rollup/plugin-node-resolve
seems to solve the issue.tsdx/src/createRollupConfig.ts
Lines 105 to 111 in 3a6d42f
Additional context
Your environment
The text was updated successfully, but these errors were encountered: