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(rust): add output.sourceMapFilename core #3005

Merged

Conversation

lippzhang
Copy link
Contributor

@lippzhang lippzhang commented May 4, 2023

Related issue (if exists)

#2938

Summary

Manage the output path of source map files
https://webpack.js.org/configuration/output/#outputsourcemapfilename

馃 Generated by Copilot at 0cf70ca

This pull request adds a new option sourceMapFilename to the rspack configuration file, which allows users to customize the filename of the source map files generated by the rspack_plugin_devtool plugin. It implements this option in the rspack_core, rspack_binding_options, rspack_plugin_devtool, and rspack_testing crates, and updates the JSON schema and typescript types for the rspack configuration file. It also makes some minor code improvements and updates the package.json file.

Walkthrough

馃 Generated by Copilot at 0cf70ca

  • Add a new source_map_filename option to the rspack configuration file and the rspack_core crate to allow users to configure the output filename of the source map files generated by the rspack_plugin_devtool plugin (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Use the [file] placeholder syntax for the source_map_filename option to support the original filename in the template, similar to webpack (link, link)
  • Check the devtool option and the public_path option in the rspack_plugin_devtool plugin to handle different modes and paths for the source map files (link)
  • Use the ..Default::default() syntax for the AssetInfo struct initialization in the rspack_plugin_asset, rspack_plugin_copy, and rspack_plugin_html plugins to improve the code readability and maintainability (link, link, link, link)
  • Fix the indentation of the test case file for the source-map feature in the webpack-test directory (link, link)

@changeset-bot
Copy link

changeset-bot bot commented May 4, 2023

鈿狅笍 No Changeset found

Latest commit: e2a9fe3

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

@lippzhang lippzhang force-pushed the feature/sourceMapFilename-lippzhang branch 4 times, most recently from 5e0f7b6 to 1ef383e Compare May 4, 2023 11:16
@lippzhang lippzhang force-pushed the feature/sourceMapFilename-lippzhang branch 3 times, most recently from 1bbf5c0 to 0c50070 Compare May 5, 2023 04:34
@ahabhgk
Copy link
Collaborator

ahabhgk commented May 6, 2023

General looks good to me, ready to merge after rebase

@lippzhang lippzhang force-pushed the feature/sourceMapFilename-lippzhang branch 3 times, most recently from 28156f6 to eeeda76 Compare May 6, 2023 08:54
@lippzhang lippzhang force-pushed the feature/sourceMapFilename-lippzhang branch from eeeda76 to e2a9fe3 Compare May 6, 2023 08:57
@lippzhang
Copy link
Contributor Author

General looks good to me, ready to merge after rebase

have rebase main branch

Copy link
Collaborator

@ahabhgk ahabhgk left a comment

Choose a reason for hiding this comment

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

Thanks!

@ahabhgk ahabhgk added this pull request to the merge queue May 6, 2023
Merged via the queue into web-infra-dev:main with commit bc43c7c May 6, 2023
10 checks passed
@ahabhgk ahabhgk linked an issue May 8, 2023 that may be closed by this pull request
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.

output.sourceMapFilename
3 participants