fix: browserslist query and rspack target #52
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adding
>=
to browserslist query(e.g.Chrome 120.0.0
->Chrome >= 120.0.0
) as it's not valid before, we didn't notice that because SWC could accept that(playground), but the lightningcss tool in Rspack is using browserslist to resolve the query in advance and it will throw an error.Change the default
syntax
to not dead browsers last 1 version. However, this is not correct for all scenes. As the defaultsyntax
should be determined by currenttarget
(node
orweb
), but in current implementation, the configs have an order which makes it hard to access the later from the former. We need a refactor IMO, to build some config builder like https://github.com/webpack/webpack/blob/main/lib/config/defaults.js. @Timeless0911 What's your opinion.Related Links
Checklist