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
Once we add a typescript option to the blueprint, we need to make sure that the vite.config.mjs includes:
esbuild: {
exclude: /\.m?ts$/,
},
Without this, Vite's built-in TS transpiler will do the wrong thing before our babel config has a chance to run. We want to handle TS along with the rest of babel.
An example of "the wrong thing" is decorators. We want them to be handled by decorator-transforms in babel, not esbuild's typescript implementation. Another example is class fields: I've seen the TS implementation of class fields break ember-concurrency/async-arrow-task-transform.
The text was updated successfully, but these errors were encountered:
Every time I've tried to use vite, I would eventually hit an error saying ERROR: TypeScript experimental decorators can only be used with class declarations. This error was raised from the vite:esbuild plugin. Since (non-decorator) TypeScript generally "worked", I did not even consider that this was the route to go.
Once we add a typescript option to the blueprint, we need to make sure that the vite.config.mjs includes:
Without this, Vite's built-in TS transpiler will do the wrong thing before our babel config has a chance to run. We want to handle TS along with the rest of babel.
An example of "the wrong thing" is decorators. We want them to be handled by decorator-transforms in babel, not esbuild's typescript implementation. Another example is class fields: I've seen the TS implementation of class fields break
ember-concurrency/async-arrow-task-transform
.The text was updated successfully, but these errors were encountered: