Skip to content

Conversation

@fi3ework
Copy link
Member

@fi3ework fi3ework commented Nov 6, 2025

Summary

should not modify MF's output config, for example, chunk hash should be reserved as the output is prone to be uploaded to CDN and conflict without hash.

Related Links

Checklist

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

@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit d901a66
🔍 Latest deploy log https://app.netlify.com/projects/rslib/deploys/690c19cc103aae000858667b
😎 Deploy Preview https://deploy-preview-1322--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fi3ework fi3ework force-pushed the mf-hahs branch 2 times, most recently from 3a6afaf to 40b6558 Compare November 6, 2025 06:16
@fi3ework fi3ework marked this pull request as ready for review November 6, 2025 07:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables content hash in filenames for Module Federation (MF) format outputs to support better caching and prevent cache staleness issues.

  • Removes the global filenameHash: false setting that was being applied to all formats
  • Adds format-specific filenameHash: false configuration for esm, cjs, umd, and iife formats
  • Excludes MF format from the filename hash override in composeOutputFilenameConfig, allowing MF to use the default Rspack hashing behavior

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/config.ts Refactors filenameHash configuration to be format-specific, excluding MF format from hash disabling
packages/core/tests/config.test.ts Updates snapshot tests to use individual snapshots per format for better test clarity
packages/core/tests/snapshots/config.test.ts.snap Regenerates snapshots to reflect the new MF hash behavior and test structure changes
tests/integration/minify/index.test.ts Updates snapshot to include content hash in MF output filename
tests/integration/format/index.test.ts Adds new test to verify MF output includes hash in filenames
tests/integration/format/mf/* Adds new MF format test fixture
pnpm-lock.yaml Registers new test fixture directory
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Timeless0911 Timeless0911 merged commit 60c30dd into main Nov 6, 2025
24 checks passed
@Timeless0911 Timeless0911 deleted the mf-hahs branch November 6, 2025 08:11
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.

3 participants