-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[🐞] Support Typescript "moduleResolution": "node16" and "bundler" #4689
Comments
Not sure i understand |
Tried and it works, can you provide a full repo that reprodices the issue? |
Here is example:
Problem is because of |
Probably related: rollup/rollup#4917 |
See also vitejs/vite#8993 |
Temporary solution:
Also remove |
I have the same issue. Here's minimal repro on StackBlitz: https://stackblitz.com/edit/qwik-starter-rfjklh?file=src%2Froot.tsx Just run |
From what I can tell, it is possible to use |
̶t̶h̶i̶s̶ ̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶w̶o̶r̶k̶ ̶n̶o̶w̶ ̶a̶s̶ ̶w̶e̶ ̶a̶r̶e̶ ̶o̶n̶ ̶d̶i̶f̶f̶e̶r̶e̶n̶t̶ ̶T̶y̶p̶e̶S̶c̶r̶i̶p̶t̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶a̶n̶d̶ ̶n̶o̶d̶e̶ ̶r̶e̶q̶u̶i̶r̶e̶m̶e̶n̶t̶ ̶n̶o̶w̶.̶ ̶p̶l̶e̶a̶s̶e̶ ̶m̶a̶k̶e̶ ̶a̶ ̶n̶e̶w̶ ̶i̶s̶s̶u̶e̶ ̶i̶f̶ ̶t̶h̶e̶r̶e̶ ̶i̶s̶ ̶s̶t̶i̶l̶l̶ ̶a̶n̶ ̶i̶s̶s̶u̶e̶ |
@PatrickJS is there any estimate date for this fix to be released? Because I still get the same error in 1.5.3, so it's not fixed yet. |
I need a repro repo the one provided is not public and is it only this version of TypeScript or can we use latest version? |
Sure, here you go: https://github.com/octet-stream/qwik-typescript-js-extension-issue |
well it's |
This doesn't solve the issue, I just get different error if I replace .js with .ts/.tsx:
It is important to mention that I need the |
oh yeah I see there were changing in tsconfig. I don't know enough about TypeScript to help with this maybe someone else can ok it looks like we need to work on updating our "moduleResolution" this seems like an optimizer issue. maybe @wmertens something with the optimizer to detect or ignore .js https://github.com/PatrickJS/qwik-typescript-js-extension-issue/tree/moduleResolution-bundler |
yeah the quick fix might be a plugin to remap the .js to the correct files before qwik takes over |
For anyone who want to use proper tsconfig.json
vite.config.ts:
|
I don't understand, doesn't ts-node look at tsconfig? We recommend using module resolution Bundler. |
@ziimakc is this still happening in 1.8.0? |
ts-node does not do anything with paths, because TS itself keeps paths untouched. It just keeps them as-is. But in order to ESM to work in Node.js, I need to use the I just tried 1.9.0 and the issue is still in the effect on a fresh project created via Also, I encounter a new issue: TypeScript seem to have problems picking up JSX types (see the screenshot) when I use the same I see the same problem at least in v1.5.3 (which is the same version from the respo I linked above) and above. It seem to cover the whole |
Had to mention that as far as I remember, this problem only affects client-side of a bundle. Server-side code runs with |
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
When using esm import
.js
or.jsx
extensions is required. Trying to follow this requirement qwik fails to build with the following error:Reproduction
git clone https://github.com/ZiiMakc/temp
npm install
npm run build
Steps to reproduce
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: