8000 feat: improve external render by JSerFeng · Pull Request #10508 · web-infra-dev/rspack · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@JSerFeng
Copy link
Contributor

Summary

Improve the rendering of ExternalModule.

Before:

import * as __WEBPACK_EXTERNALS_foo__ from 'foo'

__WEBPACK_EXTERNALS_foo__.value

This PR:

import { value } from 'foo'

value

Design detail

Add a new concatenation hook named concatenation_info, this hook is used to let module prepare some data in the correct topological order, for example, moduleA, moduleB can use this hook to add their globally used names.

ExternalModule has global names because they will insert some import statements through InitFragment.

// a.js
import { a } from 'foo';
// b.js
import { a } from 'bar';

Tap this hook, and insert the a to the globally used names, so we can deconflict the conflict symbol name.

Checklist

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

@netlify
Copy link
netlify bot commented May 29, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit a240c09
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/683ff27fd57870000853c8ff
😎 Deploy Preview https://deploy-preview-10508--rspack.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 the team The issue/pr is created by the member of Rspack. label May 29, 2025
@codspeed-hq
Copy link
codspeed-hq bot commented May 29, 2025

CodSpeed Performance Report

Merging #10508 will not alter performance

Comparing feat/improve-external-render (a240c09) with main (9cb7d7f)

Summary

✅ 12 untouched benchmarks

@JSerFeng JSerFeng changed the title Feat/improve external render feat: improve external render Jun 2, 2025
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Jun 2, 2025
@JSerFeng JSerFeng force-pushed the feat/improve-external-render branch from a66a3df to ef3d7d4 Compare June 4, 2025 07:09
@JSerFeng JSerFeng force-pushed the feat/improve-external-render branch from ef3d7d4 to a240c09 Compare June 4, 2025 07:15
@JSerFeng JSerFeng merged commit 3f539f6 into main Jun 4, 2025
35 checks passed
@JSerFeng JSerFeng deleted the feat/improve-external-render branch June 4, 2025 09:07
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.

3 participants

0