v0.1.10
版本发布时间: 2023-05-09 17:54:46
web-infra-dev/rspack最新发布版本:v0.3.13(2023-11-15 21:30:09)
Core features
builtins.minifyOptions.extractComments
You could extract the license using the configuration below:
module.exports = {
// ... snip
builtins: {
minifyOptions: {
extractComments: true // by default, rspack will use regex `@preserve|@lic|@cc_on|^\**!`
}
}
}
or Using Regexp:
module.exports = {
// ... snip
builtins: {
minifyOptions: {
extractComments: /@license/
}
}
}
inline match resource
For more details you could refer https://webpack.js.org/api/loaders/#inline-matchresource
optimization.realContentHash
By default, when you use the contenthash
option in your output filename, Rspack will generate a hash based on the module's dependencies
and other factors that can change even if the module's content has not changed. This means that the bundle will be invalidated and rebuilt even if the module's content has not changed.
However, by enabling the optimization.realContentHash
option, Rspack
will generate a hash based only on the actual content of the module. This ensures that the bundle is invalidated and rebuilt only when the module's content has actually changed.
For more details you could refer to optimization.realContentHash
What's Changed
Exciting New Features 🎉
- feat: support experiments.css by @hardfist in https://github.com/web-infra-dev/rspack/pull/2930
- feat(cli): add --entry flags by @faga295 in https://github.com/web-infra-dev/rspack/pull/2902
- feat: add compatible compilation.modules by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2932
- feat: add comments in module code generation by @faga295 in https://github.com/web-infra-dev/rspack/pull/2893
- feat: asset resource side effects by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2849
- feat(new_split_chunks): support
splitChunks.minSize
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2954 - feat: support minifyoptions extract comments by @faga295 in https://github.com/web-infra-dev/rspack/pull/2882
- feat(create-rspack): add template react-ts by @wood3n in https://github.com/web-infra-dev/rspack/pull/2963
- feat(terser): expose terser options by @dgmachado in https://github.com/web-infra-dev/rspack/pull/2983
- feat(x.mjs): add
x clean
command by @Boshen in https://github.com/web-infra-dev/rspack/pull/2980 - feat(new_split_chunks): support
reuseExistingChunk
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3000 - feat(rspack): add ignoreWarnings option by @nagy-nabil in https://github.com/web-infra-dev/rspack/pull/2987
- feat(new_split_chunks): support
splitChunks.{cacheGroup}.minSize
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3015 - feat: support inline match resource by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/3017
- feat(new_split_chunks): support
splitChunks.name
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2955 - feat: simple normal module hook by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2446
- feat: allow to pass
false
tosplitChunks.name
andsplitChunks.{cacheGroup}.name
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3029 - feat(module factory): add before_resolve hook by @suxin2017 in https://github.com/web-infra-dev/rspack/pull/2940
- feat(rust): add output.sourceMapFilename core by @lippzhang in https://github.com/web-infra-dev/rspack/pull/3005
- feat: optimization.realContentHash by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/2984
- feat(angular): adding initial support by @zackarychapple in https://github.com/web-infra-dev/rspack/pull/3009
- feat: optional-dependency by @suxin2017 in https://github.com/web-infra-dev/rspack/pull/3050
Bug Fixes 🐞
- fix: benchmark CI failed. by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2928
- fix: add missing
newSplitChunks
in schema.js by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2934 - fix: require.resolve(Weak) should eval to true in if stmt test expr by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/2935
- fix: should not reset
is_founded
inReactRefreshUsage
by @underfin in https://github.com/web-infra-dev/rspack/pull/2939 - fix: cannot reading
noEmitAssets
by @faga295 in https://github.com/web-infra-dev/rspack/pull/2942 - fix: hash chunkLoadingGlobal by @underfin in https://github.com/web-infra-dev/rspack/pull/2946
- fix: :bug: use unknown module type in SWC by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/2406
- fix(resolve): relative path resolve bug by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/2952
- fix: 🐛 unexpected export warning by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2959
- fix: Fix type checking in config examples by @danielkoller in https://github.com/web-infra-dev/rspack/pull/2965
- fix(react-hmr): inject the runtime global function by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2977
- fix: add entry startup to fix async script chunk loading by @underfin in https://github.com/web-infra-dev/rspack/pull/2966
- fix: entry startup for target node by @underfin in https://github.com/web-infra-dev/rspack/pull/3006
- fix: circular dependencies rebuild panic by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/3001
- fix(core): fix require(
./xxx/xx.js
) failed by @hardfist in https://github.com/web-infra-dev/rspack/pull/3014 - fix(core): compatible with stats.version by @hardfist in https://github.com/web-infra-dev/rspack/pull/3016
- fix(new_split_chunks): should not care about
reuseExistingChunk
if name is specified forCacheGroup
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3045 - fix: 🐛 cross compile by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3059
- fix: css url generate with auto public path by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/3061
- fix: already split module should connect chunk group at multiply entry by @underfin in https://github.com/web-infra-dev/rspack/pull/3057
- fix(resolve): bump nodejs-resolver to fix baseUrl bug in tsconfig by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/3072
Other Changes
- chore: add hmr for loader example by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/2925
- chore(rust): bump rustc to v1.69.0 (nightly-2023-04-20) by @Boshen in https://github.com/web-infra-dev/rspack/pull/2903
- chore: add eslint support by @hardfist in https://github.com/web-infra-dev/rspack/pull/2904
- refactor(new_split_chunks): remove unused code and add more comments by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2947
- chore: setup ./x script using zx by @Boshen in https://github.com/web-infra-dev/rspack/pull/2933
- refactor: clean up dependencies around swc for improving compile time by @Boshen in https://github.com/web-infra-dev/rspack/pull/2962
- refactor(plugin): asyncify
optimize_chunks
hook by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2958 - chore(rust): bump dependencies by @Boshen in https://github.com/web-infra-dev/rspack/pull/2968
- ci: 🎡 trigger test when examples change by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2971
- refactor: extract comments by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2970
- refactor(split_chunks_new): asyncify
prepare_module_group_map
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2975 - chore: 🤖 disable css erorr by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2964
- docs: pnpm install command fix based on engine by @thedeveloperpotato in https://github.com/web-infra-dev/rspack/pull/2992
- refactor(core): use directory for chunk_graph module by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2998
- chore: add node shims example by @hardfist in https://github.com/web-infra-dev/rspack/pull/2997
- test(split_chunks): add test of extract-css-to-single-chunk by @hyf0 in https://github.com/web-infra-dev/rspack/pull/2996
- chore: remove clap by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/2967
- chore: add add loader_name to loader_sync_call in trace by @hardfist in https://github.com/web-infra-dev/rspack/pull/2999
- chore: fine grained tracing by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3002
- chore: make release profile the same for Cargo.toml and node_binding/Cargo.toml by @Boshen in https://github.com/web-infra-dev/rspack/pull/3004
- ci: remove manual symbol stripping from build steps by @Boshen in https://github.com/web-infra-dev/rspack/pull/3007
- chore: 🤖 bump napi cli by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3008
- chore: 🤖 recover check on save by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3013
- chore(rust): bump sass-embedded and remove protobuf requirement by @Boshen in https://github.com/web-infra-dev/rspack/pull/3021
- chore: link to rspack-dev-guide and make content more general in CONTRIBUTING.md by @Boshen in https://github.com/web-infra-dev/rspack/pull/3020
- refactor: external module for http request by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/3023
- refactor: remove dependency parent module identifier by @underfin in https://github.com/web-infra-dev/rspack/pull/3024
- refactor(chunk_graph): split methods of
ChunkGraph
into different files by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3031 - chore: 🤖 add alias cargo test no fail fast by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3032
- test(split_chunks): Migrate
test/configCases/split-chunks-common
of Webpack by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3018 - refactor(rust): add more restriction clippy rules by @Boshen in https://github.com/web-infra-dev/rspack/pull/2974
- chore: 🤖 refactor before resolve by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3036
- refactor(new_split_chunks): use
RspackRegex
by @hyf0 in https://github.com/web-infra-dev/rspack/pull/3040 - ci: make pr and main use the same CI workflow by @Boshen in https://github.com/web-infra-dev/rspack/pull/3003
- refactor: 💡 angular support by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/3055
- chore: take bump check temporarily by @hardfist in https://github.com/web-infra-dev/rspack/pull/3064
- chore: add stale bot, which only adds the "stale" label and never closes issues or PRs by @Boshen in https://github.com/web-infra-dev/rspack/pull/3065
New Contributors
- @danielkoller made their first contribution in https://github.com/web-infra-dev/rspack/pull/2965
- @wood3n made their first contribution in https://github.com/web-infra-dev/rspack/pull/2963
- @dgmachado made their first contribution in https://github.com/web-infra-dev/rspack/pull/2983
- @thedeveloperpotato made their first contribution in https://github.com/web-infra-dev/rspack/pull/2992
- @nagy-nabil made their first contribution in https://github.com/web-infra-dev/rspack/pull/2987
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.1.9...v0.1.10