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
This is not a personal support request that should be posted on the Roots Discourse community
The feature
It seemed like a good idea to include a fallback transpiler but it complicates things a lot more than anticipated. If you aren't using babel then it's also pretty substantial baggage.
In [email protected] I would like to require projects specify the transpiler of their choice as a dependency.
Use case
For example, in a React project using [email protected] you could install:
@roots/bud
@roots/bud-react
This implicitly includes @roots/bud-babel. If you install another transpiler it takes precedence over the babel default. So, this set of dependencies will end up using swc instead of babel:
@roots/bud
@roots/bud-react
@roots/bud-swc
This seems cool but it means a fair bit of extra code, mostly conditional statements related to inferring which transpiler is installed. It's not really costly computation but it is messy and when we get it wrong it can be frustrating.
If you're using some other transpiler you still wind up with babel installed, which is wasteful.
In the case of @roots/bud-typescript the user may very well want to use both @roots/bud-babel along with @roots/bud-typescript. How do we know if they intended to? Right now users can be explicit by calling bud.typescript.useBabel() but this seems like it's having the opposite of the intended effect: it's complicating things instead of simplifying them.
In [email protected] I'd like to just have the user simply pick for their project upfront.
For swc:
@roots/bud
@roots/bud-react
@roots/bud-swc
For tsc:
@roots/bud
@roots/bud-react
@roots/bud-typescript
For tsc and babel:
@roots/bud
@roots/bud-react
@roots/bud-typescript
@roots/bud-babel
For esbuild:
@roots/bud
@roots/bud-react
@roots/bud-esbuild
For babel:
@roots/bud
@roots/bud-react
@roots/bud-babel
This is a breaking change as the choice will be required.
Notes
Affected extensions:
@roots/bud-react includes @roots/bud-babel as a fallback
@roots/bud-preset-recommend includes @roots/bud-babel as a fallback
The text was updated successfully, but these errors were encountered:
…2253)
Warn about missing compilers in `@roots/bud-preset-recommend` `register` callback.
See:
- #2076
## Type of change
**PATCH: backwards compatible change**
Agreement
The feature
It seemed like a good idea to include a fallback transpiler but it complicates things a lot more than anticipated. If you aren't using babel then it's also pretty substantial baggage.
In [email protected] I would like to require projects specify the transpiler of their choice as a dependency.
Use case
For example, in a React project using [email protected] you could install:
This implicitly includes @roots/bud-babel. If you install another transpiler it takes precedence over the babel default. So, this set of dependencies will end up using swc instead of babel:
This seems cool but it means a fair bit of extra code, mostly conditional statements related to inferring which transpiler is installed. It's not really costly computation but it is messy and when we get it wrong it can be frustrating.
If you're using some other transpiler you still wind up with babel installed, which is wasteful.
In the case of @roots/bud-typescript the user may very well want to use both @roots/bud-babel along with @roots/bud-typescript. How do we know if they intended to? Right now users can be explicit by calling
bud.typescript.useBabel()
but this seems like it's having the opposite of the intended effect: it's complicating things instead of simplifying them.In [email protected] I'd like to just have the user simply pick for their project upfront.
For swc:
For tsc:
For tsc and babel:
For esbuild:
For babel:
This is a breaking change as the choice will be required.
Notes
Affected extensions:
The text was updated successfully, but these errors were encountered: