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

feat: add build unique id for detecting #6865

Merged
merged 5 commits into from
Jun 24, 2024
Merged

Conversation

LingyuCoder
Copy link
Contributor

@LingyuCoder LingyuCoder commented Jun 20, 2024

Summary

Add build unique id for detecting:

  • bundler=rspack@version

  • Add new runtime global: RuntimeGlobals::RSPACK_UNIQUE_ID

  • Add runtime api: __rspack_unique_id__ to get the unique id

  • Add runtime module: RspackUniqueIdRuntimeModule to generate unique id, it will be injected into runtime when

    • rspackFuture.bundlerInfo.foce=true
    • rspackFuture.bundlerInfo.foce.includes("uniqueId")
    • use __rspack_unique_id__ manually
  • Add this runtime module in BundlerInfoPlugin, just like RspackVersionRuntimeModule

Checklist

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

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Jun 20, 2024
Copy link

netlify bot commented Jun 20, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 6baf527
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/667964d887ec520008c3269b

@LingyuCoder LingyuCoder force-pushed the feat/bundler-info-id branch from 3788b48 to 17cf448 Compare June 20, 2024 08:46
@LingyuCoder LingyuCoder marked this pull request as ready for review June 20, 2024 09:21
@LingyuCoder LingyuCoder enabled auto-merge (squash) June 20, 2024 12:16
chenjiahan
chenjiahan previously approved these changes Jun 24, 2024
Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

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

LGTM 👍

chenjiahan
chenjiahan previously approved these changes Jun 24, 2024
@LingyuCoder LingyuCoder merged commit 7215fa8 into main Jun 24, 2024
29 checks passed
@LingyuCoder LingyuCoder deleted the feat/bundler-info-id branch June 24, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants