Skip to content

fix: failed to resolve 'browserslist-load-config' module#12767

Merged
chenjiahan merged 2 commits intov2from
browserslist_load_module_0117
Jan 17, 2026
Merged

fix: failed to resolve 'browserslist-load-config' module#12767
chenjiahan merged 2 commits intov2from
browserslist_load_module_0117

Conversation

@chenjiahan
Copy link
Member

Summary

Fix failed to resolve browserslist-load-config module. The package is small and can be bundled into the main bundle.

image

Related links

Checklist

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

Copilot AI review requested due to automatic review settings January 17, 2026 02:25
@chenjiahan chenjiahan requested a review from hardfist as a code owner January 17, 2026 02:25
@netlify
Copy link

netlify bot commented Jan 17, 2026

βœ… Deploy Preview for rspack-v2 ready!

Name Link
πŸ”¨ Latest commit 8d5d59d
πŸ” Latest deploy log https://app.netlify.com/projects/rspack-v2/deploys/696af3a51bbd57000842bd36
😎 Deploy Preview https://deploy-preview-12767--rspack-v2.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.

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: bug fix release: bug related release(mr only) labels Jan 17, 2026
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 fixes a module resolution issue with browserslist-load-config by removing it from the prebundled dependencies and importing it directly. The change allows the package to be bundled into the main bundle instead of being externalized.

Changes:

  • Removed browserslist-load-config from prebundled dependencies in prebundle.config.mjs
  • Updated TypeScript path mappings to remove the compiled module reference
  • Refactored target.ts to use a top-level import instead of dynamic require
  • Removed extraneous blank lines in documentation files

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/rspack/prebundle.config.mjs Removed browserslist-load-config from the dependencies array
packages/rspack/tsconfig.json Removed path mapping for the compiled browserslist-load-config module
packages/rspack/src/config/target.ts Changed from dynamic require to static import for browserslist-load-config
website/docs/zh/config/experiments.mdx Removed blank line between code block and next section
website/docs/en/config/experiments.mdx Removed blank line between code block and next section

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

πŸ“Š Quick Summary
Project Total Size Change
react-10k 5.7 MB -
react-1k 825.3 KB -
react-5k 2.7 MB -
rome 985.8 KB -
ui-components 2.1 MB -
πŸ“‹ Detailed Reports (Click to expand)

πŸ“ react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
πŸ“Š Total Size 5.7 MB - -
πŸ“„ JavaScript 5.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
πŸ“ Other Assets 0 B - -

πŸ“ react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
πŸ“Š Total Size 825.3 KB - -
πŸ“„ JavaScript 825.3 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
πŸ“ Other Assets 0 B - -

πŸ“ react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
πŸ“Š Total Size 2.7 MB - -
πŸ“„ JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 0 B - -
πŸ“ Other Assets 0 B - -

πŸ“ rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
πŸ“Š Total Size 985.8 KB - -
πŸ“„ JavaScript 985.8 KB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
πŸ“ Other Assets 0 B - -

πŸ“ ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
πŸ“Š Total Size 2.1 MB - -
πŸ“„ JavaScript 2.0 MB - -
🎨 CSS 83.0 KB - -
🌐 HTML 0 B - -
πŸ“ Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

πŸ“¦ Binary Size-limit

Comparing 8d5d59d to chore: limit threads for codspeed benchmark (#12763) by CPunisher

πŸŽ‰ Size decreased by 322.75KB from 47.99MB to 47.68MB (⬇️0.66%)

@chenjiahan chenjiahan merged commit 5629c3b into v2 Jan 17, 2026
72 of 79 checks passed
@chenjiahan chenjiahan deleted the browserslist_load_module_0117 branch January 17, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug 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