What's Changed
Highlight
Added diagnostic suggestions for extension-less module resolutions
This added suggestions for potential files that can be resolved while the bundler's configuration may not be correct. This might also be helpful for those whose project was migrated from lower versions.
Project tree:
<PROJECT_ROOT>/
├─ a.txt
└─ index.js
Resolve error:
ERROR in ./index.js
× Resolve error: Can't resolve './a' in '/'
╭────
1 │ import a from './a';
· ──────
╰────
help: Found the module './a.txt' exists, but its extension is not listed in the `resolve.extensions`. Here are some possible solutions:
1. add the extension `".txt"` to `resolve.extensions` in your rspack configuration
2. use '../a.txt' instead of './a'
The error suggests to add the extension ".txt"
to resolve.extensions
, as, by default, rspack does not support for extension-less module requests like "txt".
Kudos to @luhc228.
Performance Improvements ⚡
Exciting New Features 🎉
- feat: support resource query in context module by @faga295 in #5476
- feat: eval more identifier and call expr by @bvanjoi in #5670
- feat: support stats.usedExports and stats.providedExports by @LingyuCoder in #5647
- feat: eval more unary expr by @bvanjoi in #5673
- feat: rename during walk assign expr by @bvanjoi in #5701
- feat(dev-server): support custom client ws transport by @bvanjoi in #5710
- feat: eval more binary add op by @bvanjoi in #5720
- feat: support
parser.hooks.expression_conditional_operation
by @bvanjoi in #5754 - feat: support eval
undefined
by @h-a-n-a in #5762 - feat: add hint for missing resolve.extensions when resolving module by @luhc228 in #5680
Bug Fixes 🐞
- fix: should not panic while running build_module hook by @LingyuCoder in #5621
- fix: fix broken js error stack by @h-a-n-a in #5622
- fix: runtime module hook after tree runtime requirements by @LingyuCoder in #5661
- fix: runtime condition of hot accept dependency by @LingyuCoder in #5636
- fix: concate modules with css by @JSerFeng in #5635
- fix: typo
vesrion
->version
by @bvanjoi in #5678 - fix: 5595 by @IWANABETHATGUY in #5616
- fix: can not resolve warning of cjs export require by @LingyuCoder in #5683
- fix: hit cache when imports connection not changed by @JSerFeng in #5694
- fix: eval
typeof aliasRequire
should work by @bvanjoi in #5693 - fix: panic in harmony_export_imported_specifier_dependency by @IWANABETHATGUY in #5697
- fix: split-chunks inf loop by @JSerFeng in #5700
- fix: module_graph update module align with webpack by @jerrykingxyz in #5692
- fix: add missing field in EvalSourceMapDevToolPlugin by @JSerFeng in #5717
- fix: disable incRebuild when enable new treeshaking by @jerrykingxyz in #5718
- fix: quote meta slash error by @LingyuCoder in #5719
- fix: computed member expression on exports by @LingyuCoder in #5712
- fix(plugin/swc_js_minimizer): remove parens before optimizing by @magic-akari in #5726
- fix: hooks.contextModuleFactory should use cmf not nmf by @JSerFeng in #5732
- fix: missing export when using library output under production mode by @IWANABETHATGUY in #5740
- fix: loaderCtx.hot should be injected by HMRPlugin by @JSerFeng in #5741
- fix: bump
oxc-resolver
to fix windows path by @Boshen in #5722 - fix: reconsider skipped connections by @ahabhgk in #5724
- fix: should not warp
(0,
for non-directly import by @bvanjoi in #5749 - fix: should report validation error if no callback exists by @h-a-n-a in #5753
- fix: minChunks should be greater than 0 by @JSerFeng in #5750
- fix: hash exports info should not fall into inf recursive by @JSerFeng in #5770
- fix: should visit prop-name in getter/setter by @JSerFeng in #5773
- fix: update chunk files in hmr by @LingyuCoder in #5768
- fix: runtime chunk filename by @LingyuCoder in #5778
- fix: cjs export require should bailout in old tree shaking by @LingyuCoder in #5779
- fix: CSS module does not emit correctly with concatenateModules by @IWANABETHATGUY in #5711
- fix: compiler test error in !windows by @SyMind in #5780
Other Changes
- chore: fix yanked handlebars by @h-a-n-a in #5617
- refactor: cleanup
expr_mather::import_meta
by @bvanjoi in #5623 - chore: support open macos & windows ci in PR by @jerrykingxyz in #5626
- chore: replace splitter on windows !windows !macos by @h-a-n-a in #5625
- refactor: align get_exports_type with webpack by @LingyuCoder in #5502
- refactor: merge duplicate implementation of boolean matcher by @LingyuCoder in #5633
- chore(deps): update npm devdependencies by @renovate in #5524
- refactor: align module request of CommonJsExportRequireDependency by @LingyuCoder in #5612
- chore(deps): update crates by @renovate in #5629
- chore: do not update pnpm with renovate bot by @Boshen in #5649
- chore(deps): update npm dev dependencies by @renovate in #5652
- refactor: refactor remove parent modules by @JSerFeng in #5646
- chore: rename bundler info plugin by @ahabhgk in #5660
- chore(deps): update npm dev dependencies (major) by @renovate in #5653
- chore: migrate husky to v9 by @Boshen in #5664
- chore: run prettier by @Boshen in #5662
- chore: remove unused scripts/update_swc_version.js by @Boshen in #5665
- chore(deps): update github/issue-labeler action to v3.4 by @renovate in #5651
- chore(deps): update crates by @renovate in #5650
- ci: improve cargo-deny run by @Boshen in #5667
- ci: upgrade all default node versions to v20 by @Boshen in #5668
- chore: remove the unused
.changeset
directory by @Boshen in #5669 - chore(deps): update github-actions (major) by @renovate in #5525
- refactor: replace asyncDependenciesBlockId with Identifier by @JSerFeng in #5663
- refactor: cleanup
import_scanner
by @bvanjoi in #5672 - refactor: align runtime condition of HarmonyImportDependency by @LingyuCoder in #5643
- refactor: align get_exports of CommonJsExportRequireDependency by @LingyuCoder in #5588
- chore: remove unused dev dependencies by @Boshen in #5674
- chore: remove unused jest-worker from rspack-plugin-minify by @Boshen in #5676
- test: flush snapshot by @LingyuCoder in #5677
- refactor: cleanup some unsed fn by @bvanjoi in #5679
- chore: change non-using facing dependencies to devDependencies by @Boshen in #5681
- chore: bump oxc-resolver by @Boshen in #5682
- refactor: mv
CallHooksName
to spearte module by @bvanjoi in #5691 - refactor: cleanup
parser.enter_assign
by @bvanjoi in #5702 - chore: speed up webpack-test/configCases/css/urls by using smaller files by @Boshen in #5715
- refactor: cleanup
HarmonyImportDependencyScanner
by @bvanjoi in #5737 - refactor: cleanup
parser.imports
by @bvanjoi in #5742 - refactor: unnecessary Arc clone by @bvanjoi in #5743
- refactor: cleanup
ImporterInfo
by @bvanjoi in #5744 - refactor: make hook by @ahabhgk in #5739
- refactor: align configCases runner by @h-a-n-a in #5620
- chore: align existing stats cases by @SyMind in #5716
- refactor: cleanup
HarmonyImportRefDependencyScanner
by @bvanjoi in #5748 - chore: align webpack hotCases by @SyMind in #5736
- chore(deps): update npm dev dependencies by @renovate in #5727
- chore: align webpack watchCases by @SyMind in #5733
- chore(deps): update crates by @renovate in #5675
- refactor: cleanup
HarmonyExportDependencyScanner
by @bvanjoi in #5756 - refactor: cleanup deps collections phase by @bvanjoi in #5765
- chore: align compiler test by @SyMind in #5767
- chore: stop updating miette from renovate by @Boshen in #5783
New Contributors
Full Changelog: v0.5.4...v0.5.5