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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support experiments.css #2930

Merged
merged 1 commit into from
Apr 25, 2023
Merged

feat: support experiments.css #2930

merged 1 commit into from
Apr 25, 2023

Conversation

hardfist
Copy link
Contributor

@hardfist hardfist commented Apr 25, 2023

Related issue (if exists)

closes #2919

Summary

馃 Generated by Copilot at 7fa32b8

This pull request adds css support as an experimental option for the rspack bundler. It modifies the TypeScript and Rust code in rspack, rspack_binding_options, and rspack_core to handle the new option. It also updates the unit test file to cover the new feature.

Walkthrough

馃 Generated by Copilot at 7fa32b8

  • Add a new css field to the Experiments interface and struct in TypeScript and Rust, respectively, to indicate whether to enable the css support feature for the rspack bundler (link, link, link)
  • Add a new css field to the RawExperiments struct in Rust, which mirrors the Experiments field and is used for the conversion between TypeScript and Rust options (link, link, link)
  • Add a validation step and a default value for the css field in the getRawExperiments and applyExperimentsDefaults functions in TypeScript, respectively (link, link)
  • Add a conditional block to the applyModuleDefaults function in TypeScript, which adds a rule for handling css files and css modules to the module rules array if the css field is true (link, link, link)
  • Update the unit test file Defaults.unittest.ts in TypeScript, to check the default and overridden values of the css field and the corresponding module rules (link, link)

@changeset-bot
Copy link

changeset-bot bot commented Apr 25, 2023

鈿狅笍 No Changeset found

Latest commit: 7fa32b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added release: feature team The issue/pr is created by the member of Rspack. labels Apr 25, 2023
hyf0
hyf0 previously approved these changes Apr 25, 2023
h-a-n-a
h-a-n-a previously approved these changes Apr 25, 2023
@hardfist hardfist added this pull request to the merge queue Apr 25, 2023
Merged via the queue into main with commit 2747b7c Apr 25, 2023
13 checks passed
@hardfist hardfist deleted the add-experiments branch April 25, 2023 08:19
siyou pushed a commit to siyou/rspack that referenced this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

supports experiments.css option
3 participants