-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
import(/* @vite-ignore */) is not worked in *.ts for v4 #11377
Comments
Hello @igisev. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Please help us by creating a real reproduction, you can use https://vite.new for it. Thanks! |
minimal reproduction |
I found that warning is only in ts-files, not in js-files |
It seems the comment has been removed on transpiling from TS to JS. |
Looks like it was (sort-of) a breaking change introduced in esbuild 0.15.17 (evanw/esbuild#2439). The issue in general is tracked at evanw/esbuild#2721 |
This is fixed in esbuild v0.16.14 |
Describe the bug
In v4.0.1 the comment
/* @vite-ignore */
is ignored forimport(/* @vite-ignore */)
Run
npx vite
.In case1 and case2 a warning will be issued:
NOTE: for v3.2.5 case2 without warning.
Reproduction
https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitationshttps://stackblitz.com/edit/vitejs-vite-tyj1xj?file=main.ts&terminal=dev
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: