Replies: 2 comments
-
You might need to tweak more esbuild options so that it process js files https://vite.dev/config/shared-options.html#esbuild
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the tips, it works perfectly fine ! In cas of anyone got the same issue, I've done this in vite.config.ts file :
Best regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've setup my project to output to es2015 and it working fine when I build.
esbuild: { target: "es2015", sourcemap: true, }, build: { target: "es2015" }
But when I try ro preview during dev, I got this error : Uncaught SyntaxError: Unexpected token .
The problem is coming from file @vite/client with the ?. that is not available on es2015 :
this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod));
How to force vite.js to use es2015 for @vite/client also ?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions