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

refactor: clean up dependencies around swc for improving compile time #2962

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

Boshen
Copy link
Contributor

@Boshen Boshen commented Apr 27, 2023

Related issue (if exists)

relates

Summary

🤖 Generated by Copilot at 1a902f5

This pull request updates and improves the rspack project, which is a Rust-based bundler and packer for web development. It mainly focuses on the rspack_plugin_javascript crate, which handles the parsing, transforming, minifying, and code generation of JavaScript and TypeScript code. It also updates the dependencies of the project to use the latest swc crates, which provide various features and utilities for working with web languages. Additionally, it fixes some minor issues and formatting in the rspack_ast_viewer, rspack_core, and rspack_regex crates.

Walkthrough

🤖 Generated by Copilot at 1a902f5

  • Update dependencies of swc crates and enable new features for rspack project (link, link, link, link, link, link)
  • Remove unused imports and types from swc_core crate and replace them with custom types or types from other swc crates (link, link, link, link, link, link, link, link, link, link)
  • Add imports and types from swc_config, swc_ecma_minifier, swc_error_reporters, and swc_node_comments crates to provide configuration, minification, error reporting, and comment handling features for JavaScript and TypeScript code (link, link, link, link, link, link, link, link)
  • Replace the use of swc_core::ecma::minifier::optimize with swc_ecma_minifier::optimize and pass the custom JsMinifyOptions struct to the minification function (link, link)
  • Define a helper function to convert a ModuleType value to an IsModule value and use it to pass the module type information to the swc parser (link, link, link)
  • Replace the use of swc_core::base::TransformOutput with the custom TransformOutput struct and use it to represent the output of the code generation process (link, link)
  • Remove some indentation and trailing whitespace from code blocks for minor formatting improvements (link, link)

@changeset-bot
Copy link

changeset-bot bot commented Apr 27, 2023

⚠️ No Changeset found

Latest commit: 0d4f7e5

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

@Boshen Boshen force-pushed the prune-swc branch 2 times, most recently from a84e377 to 9cca8c3 Compare April 27, 2023 09:39
hyf0
hyf0 previously approved these changes Apr 27, 2023
@Boshen
Copy link
Contributor Author

Boshen commented Apr 27, 2023

I think I need at least 3 approvals from @IWANABETHATGUY @hyf0 @h-a-n-a

@hyf0 hyf0 dismissed their stale review April 27, 2023 10:01

Tests are failed.

@Boshen Boshen enabled auto-merge April 27, 2023 13:01
@Boshen Boshen added this pull request to the merge queue Apr 27, 2023
Merged via the queue into main with commit 411a2a2 Apr 27, 2023
10 checks passed
@Boshen Boshen deleted the prune-swc branch April 27, 2023 13:02
IWANABETHATGUY pushed a commit that referenced this pull request Apr 28, 2023
…#2962)

refactor: clean up dependencies around swc for improving compile time
siyou pushed a commit to siyou/rspack that referenced this pull request May 14, 2023
…web-infra-dev#2962)

refactor: clean up dependencies around swc for improving compile time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants