-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Parcel 2: transformer-typescript-tsc not respected during build #5761
Comments
This should work: {
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"],
"*.{js,mjs,jsm,jsx,es6,cjs}": ["@parcel/transformer-js"]
}
} |
Nope
|
I'm afraid TLA isn't support at the moment: #4028 |
@mischnic why is TLA so complicated? Parcel wraps all code into a |
A pity about TLA. |
@danieltroger -> #4028 (comment) @avalanche1 tsc did run in your case, it's just that Babel also ran after that. I guess that's unexpected? |
It is. Is that by design? Seems like a redundant iteration (from a user standpoint). |
One thing that the tsc transformer doesn't do is applying the browserslist config (= what babel-preset-env does) |
|
|
Can you elaborate why you want tsc? I'm curious lol. Imo it is buggy and I don't like its philosophy of "you have to configure it with some options you can never guess or it will transpile your code wrong". I switched to parcel 2 nightly in production solely because I wanted to get away from tsc and do not regret it. So please let's keep the seamless experience of not using tsc. |
Because, as stated in the official V2 documentation - https://v2.parceljs.org/languages/typescript/:
|
And it's not possible to configure what you want differently?
Ah yeah that sucks. Thanks for the insight! |
|
I, no
Ah, no; that was a false positive. Gotta re-open. |
Without any browserslist config and without any babelrc file, I still get But as I've said, all of these workarounds don't change the fact that TLA won't work
|
Let TLA support simmer in it's own issue. |
Hmm.. I do get |
You could print the used (/generated) Babel config here:
|
I didn't understand, what you meant |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
🐛 bug report
Although, I have transformer-typescript-tsc set up in
.parcelrc
- it looks like the code is still being piped through Babel.I am calling a top-level
await
. Clearly, Babel doesn't support that out of the box, while TS 4.1 does.🎛 Configuration (.babelrc, package.json, cli command)
.parcelrc
:.package.json
:😯 Current Behavior
I get this console error
🤔 Expected Behavior
Obviously, compile w\o errors; using
tsc
.💁 Possible Solution
🔦 Context
💻 Code Sample
popup.ts
:The text was updated successfully, but these errors were encountered: