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: support alias require #5520

Merged
merged 1 commit into from
Jan 30, 2024
Merged

feat: support alias require #5520

merged 1 commit into from
Jan 30, 2024

Conversation

bvanjoi
Copy link
Collaborator

@bvanjoi bvanjoi commented Jan 30, 2024

Fixes #5498
Fixes #3346

// code.js
const alias = require
alias('./foo') // now `foo.js` will be bundled

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Jan 30, 2024
@bvanjoi bvanjoi merged commit 1b013d1 into web-infra-dev:main Jan 30, 2024
17 checks passed
@hardfist
Copy link
Contributor

!bench

@rspack-bot
Copy link

rspack-bot commented Jan 30, 2024

📝 Benchmark detail: Open

Name Base (2024-01-30 155a7e1) Current Change
10000_development-mode + exec 1.69 s ± 10 ms 1.7 s ± 18 ms +0.62 %
10000_development-mode_hmr + exec 942 ms ± 15 ms 948 ms ± 11 ms +0.61 %
10000_production-mode + exec 2.62 s ± 29 ms 2.62 s ± 21 ms -0.00 %
threejs_development-mode_10x + exec 2.02 s ± 15 ms 2.03 s ± 14 ms +0.52 %
threejs_development-mode_10x_hmr + exec 1.23 s ± 16 ms 1.23 s ± 8.1 ms -0.25 %
threejs_production-mode_10x + exec 5.88 s ± 124 ms 5.86 s ± 91 ms -0.36 %
arco-pro_development-mode + exec 2.65 s ± 45 ms 2.67 s ± 28 ms +0.45 %
arco-pro_development-mode_hmr + exec 1.09 s ± 18 ms 1.09 s ± 18 ms -0.46 %
arco-pro_production-mode + exec 4.39 s ± 23 ms 4.36 s ± 53 ms -0.83 %

@bvanjoi
Copy link
Collaborator Author

bvanjoi commented Jan 30, 2024

!canary

Copy link
Contributor

0.5.2-canary-b84638e-20240130131954

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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

identifier require is not transformed aliasedRequire support
4 participants