preact-cli
preact-cli copied to clipboard
Use Babel 7.x; Extract "babel" package; Update "browsers" default
Not ready for merge – must resolve pre-existing Jest failures first.
What kind of change does this PR introduce?
Refactor, Feature
Did you add tests for your changes?
No, they're already a mess (again).
Summary
-
Better browser list
-
Upgraded Babel deps from
betato7.xstable -
Extracted Preact-specific config into
@preact/babelpackage -
Applied CLI-specific Babel config changes within CLI:
- Read & disable
babelrc - Attach
fast-asyncsupport (#617)
- Read & disable
-
Fixed my typo artifact (
old ~> .babelrc)
Does this PR introduce a breaking change?
The default browsers changed, dropping default support for legacy browsers.. so technically, "yes" but this is going to be a major bump already.
The Babel behavior should be unchanged; if anything, it'd be beta to 7.x changes.
This allows non-CLI users to download & designate @preact/babel as a Babel preset.
GitHub killed my original PR notes... wut
@lukeed Really appreciate this. Was looking for a dedicated preact babel preset to recommend the other day that works with babel v7 👍
Me too! I want to slice up what I have on PWA's preset-preact (and 7.x here) into these bite-sized chunks.
Repeating config over & over again across build chains is silly
Does this pass @ForsakenHarmony inspection now?
still don't know how I feel about fast-async being excluded
also have babel-plugin-macros in there now 👀
I feel like it's best to just have this as like cli-babel-config or smth
IE11 has more user share than Edge 17/18 as the time of writing this. I would not recommend going with that "better" not so better coverage.
the difference is, ie 11 keeps us back a lot further than edge, which with that browser list probably doesn't even get special treatment
I completely understand that, then the question I should have asked is: what's the purpose of preact-cli? towards production applications used by corporations, or more towards prototypes future-thinking that don't care about usage? Of course it's probably none of the extremes, and in the end it's configurable so... up to the owners. I just threw my opinion.