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
tsconfig.json is ignored, so language features like class properties, decorators need to be provided by a Babel plugin.
What % of TypeScript projects use a tsconfig.json?
I use a tsconfig in 100% of my TypeScript project, so in my case at least I am always going to manually configure to use tsc (which I never did in Parcel 1, it just worked)
It also seems that the reason Babel is the default is because:
because it is generally faster in our pipeline
So I suggest thouse developers who are in a hurry and need a super fast TypeScript transformer can configure Babel in the .rc, but for most cases developers will want to transform TypeScript as nature intended using tsc.
So I think tsc should be the default not Babel.
🔦 Context
I am building a Web Component repository using LitElement and the default Babel transformer ignores the tsconfig.json so the decorators I use in the component class throws and error:
× Build failed.
@parcel/transformer-babel: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (16:1):
I guess this would also throw an error for Angular projects as Angular heavily uses decorators.
🤔 Expected Behavior
Parcel 2 thows the above when encountering decorators,
😯 Current Behavior
Parcel should just work as Parcel 1 does.
The text was updated successfully, but these errors were encountered:
Yes but my point is that you shouldn't have to set any configuration, Parcel 1 I didn't set any configuration, but now I'm going to have to set the configuration on every project.
I will continue this discussion on one of the other treads
I am a big user of Parel, I use it in all my projects, now I thourght I'd better switch to using Parcel 2.
🙋 feature request
Use
tsc
rather than Babel as the default transformer for Typescript,The default way of transforming TypeScript is using Babel.
However:
What % of TypeScript projects use a
tsconfig.json
?I use a
tsconfig
in 100% of my TypeScript project, so in my case at least I am always going to manually configure to usetsc
(which I never did in Parcel 1, it just worked)It also seems that the reason Babel is the default is because:
So I suggest thouse developers who are in a hurry and need a super fast TypeScript transformer can configure Babel in the
.rc
, but for most cases developers will want to transform TypeScript as nature intended usingtsc
.So I think
tsc
should be the default not Babel.🔦 Context
I am building a Web Component repository using LitElement and the default Babel transformer ignores the
tsconfig.json
so the decorators I use in the component class throws and error:I guess this would also throw an error for Angular projects as Angular heavily uses decorators.
🤔 Expected Behavior
Parcel 2 thows the above when encountering decorators,
😯 Current Behavior
Parcel should just work as Parcel 1 does.
The text was updated successfully, but these errors were encountered: