Skip to content
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

fix: browserslist query and rspack target #52

Merged
merged 1 commit into from
Aug 5, 2024
Merged

fix: browserslist query and rspack target #52

merged 1 commit into from
Aug 5, 2024

Conversation

fi3ework
Copy link
Member

@fi3ework fi3ework commented Aug 1, 2024

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.

    image
  • Change the default syntax to not dead browsers last 1 version. However, this is not correct for all scenes. As the default syntax should be determined by current target (node or web), 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

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link
Member Author

@fi3ework fi3ework left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • TODO: merge lib config at the very beginning to eliminate post update stage.

@Timeless0911 Timeless0911 merged commit b287f1e into main Aug 5, 2024
3 checks passed
@Timeless0911 Timeless0911 deleted the target branch August 5, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants