diff --git a/Cargo.lock b/Cargo.lock index 83a461dbd273..e9306339b712 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4211,6 +4211,7 @@ dependencies = [ "rustc-hash", "simd-json", "sugar_path", + "thread_local", "tracing", ] @@ -4503,6 +4504,7 @@ dependencies = [ "rspack_hash", "rspack_hook", "rspack_util", + "thread_local", "tracing", ] @@ -4673,6 +4675,7 @@ dependencies = [ "rspack_plugin_devtool", "rspack_util", "rustc-hash", + "thread_local", "tokio", "tracing", ] @@ -4854,6 +4857,7 @@ dependencies = [ "swc_config", "swc_core", "swc_ecma_minifier", + "thread_local", "tracing", ] @@ -4948,12 +4952,11 @@ dependencies = [ [[package]] name = "rspack_sources" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de9084a384c14e99622aa43966ec9e8609130dc4b5513d26961f3d381dfafbf" +checksum = "7d5f8ab2ee9b7bc3eff7bd03e3845203ff06b4cf18f277740d262f022bb8e18d" dependencies = [ "dyn-clone", - "itertools 0.13.0", "memchr", "rustc-hash", "serde", @@ -6758,12 +6761,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 52044ef39fa7..38dafbe1dec7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,7 @@ regex-syntax = { version = "0.8.5", default-features = false, features = regress = { version = "0.10.4", default-features = false, features = ["pattern"] } ropey = { version = "1.6.1", default-features = false } rspack_resolver = { features = ["package_json_raw_json_api", "yarn_pnp"], version = "0.6.4", default-features = false } -rspack_sources = { version = "=0.4.13", default-features = false } +rspack_sources = { version = "0.4.14", default-features = false } rustc-hash = { version = "2.1.0", default-features = false } ryu-js = { version = "1.0.2", default-features = false } scopeguard = { version = "1.2.0", default-features = false } @@ -99,6 +99,7 @@ sugar_path = { version = "1.2.0", default-features = false, features = syn = { version = "2.0.95", default-features = false } termcolor = { version = "1.4.1", default-features = false } textwrap = { version = "0.16.1", default-features = false } +thread_local = { version = "1.1.9", default-features = false } tokio = { version = "1.42.0", default-features = false, features = ["rt", "rt-multi-thread"] } toml = { version = "0.8.19", default-features = false, features = ["parse", "display"] } tracing = { version = "0.1.41", default-features = false, features = ["max_level_trace", "release_max_level_trace"] } diff --git a/crates/rspack_binding_api/src/source.rs b/crates/rspack_binding_api/src/source.rs index 61e8256b9458..93b1a258172f 100644 --- a/crates/rspack_binding_api/src/source.rs +++ b/crates/rspack_binding_api/src/source.rs @@ -2,7 +2,7 @@ use std::{hash::Hash, sync::Arc}; use napi_derive::napi; use rspack_core::rspack_sources::{ - BoxSource, CachedSource, ConcatSource, MapOptions, OriginalSource, RawBufferSource, + BoxSource, CachedSource, ConcatSource, MapOptions, ObjectPool, OriginalSource, RawBufferSource, RawStringSource, ReplaceSource, Source, SourceExt, SourceMap, SourceMapSource, SourceValue, WithoutOriginalOptions, }; @@ -101,7 +101,7 @@ impl From for BoxSource { } fn to_webpack_map(source: &dyn Source) -> Result> { - let map = source.map(&MapOptions::default()); + let map = source.map(&ObjectPool::default(), &MapOptions::default()); map.map(|m| m.to_json()).transpose().to_napi_result() } diff --git a/crates/rspack_cacheable/src/with/as_preset/rspack_sources/mod.rs b/crates/rspack_cacheable/src/with/as_preset/rspack_sources/mod.rs index 2b633cbd5401..889fca846896 100644 --- a/crates/rspack_cacheable/src/with/as_preset/rspack_sources/mod.rs +++ b/crates/rspack_cacheable/src/with/as_preset/rspack_sources/mod.rs @@ -6,7 +6,8 @@ use rkyv::{ }; use rspack_macros::enable_cacheable as cacheable; use rspack_sources::{ - BoxSource, RawBufferSource, Source, SourceExt, SourceMap, SourceMapSource, WithoutOriginalOptions, + BoxSource, ObjectPool, RawBufferSource, Source, SourceExt, SourceMap, SourceMapSource, + WithoutOriginalOptions, }; use super::AsPreset; @@ -42,7 +43,7 @@ where field: &BoxSource, serializer: &mut S, ) -> Result { - let map = match field.map(&Default::default()) { + let map = match field.map(&ObjectPool::default(), &Default::default()) { Some(map) => Some( map .to_json() diff --git a/crates/rspack_cacheable_test/tests/with/as_preset/rspack_sources.rs b/crates/rspack_cacheable_test/tests/with/as_preset/rspack_sources.rs index a474d50e7237..5e24ebb53409 100644 --- a/crates/rspack_cacheable_test/tests/with/as_preset/rspack_sources.rs +++ b/crates/rspack_cacheable_test/tests/with/as_preset/rspack_sources.rs @@ -1,5 +1,5 @@ use rspack_cacheable::{enable_cacheable as cacheable, from_bytes, to_bytes, with::AsPreset}; -use rspack_sources::{BoxSource, RawBufferSource, RawStringSource, SourceExt}; +use rspack_sources::{BoxSource, ObjectPool, RawBufferSource, RawStringSource, SourceExt}; #[cacheable] #[derive(Debug)] @@ -12,8 +12,8 @@ fn test_rspack_source() { let new_data: Data = from_bytes(&bytes, &()).unwrap(); assert_eq!(data.0.buffer(), new_data.0.buffer()); assert_eq!( - data.0.map(&Default::default()), - new_data.0.map(&Default::default()) + data.0.map(&ObjectPool::default(), &Default::default()), + new_data.0.map(&ObjectPool::default(), &Default::default()) ); } diff --git a/crates/rspack_core/src/utils/extract_source_map.rs b/crates/rspack_core/src/utils/extract_source_map.rs index 9ca78728def9..6330588c283e 100644 --- a/crates/rspack_core/src/utils/extract_source_map.rs +++ b/crates/rspack_core/src/utils/extract_source_map.rs @@ -351,9 +351,9 @@ pub async fn extract_source_map( } // Build the final SourceMap using setter methods - consume resolved_sources to avoid cloning - let (sources_vec, sources_content_vec): (Vec, Vec) = resolved_sources + let (sources_vec, sources_content_vec): (Vec, Vec>) = resolved_sources .into_iter() - .map(|(url, content)| (url, content.unwrap_or_default())) + .map(|(url, content)| (url, Arc::from(content.unwrap_or_default()))) .unzip(); source_map.set_sources(sources_vec); diff --git a/crates/rspack_javascript_compiler/src/compiler/stringify.rs b/crates/rspack_javascript_compiler/src/compiler/stringify.rs index 83f8be83498e..3247e59bdca3 100644 --- a/crates/rspack_javascript_compiler/src/compiler/stringify.rs +++ b/crates/rspack_javascript_compiler/src/compiler/stringify.rs @@ -156,8 +156,7 @@ impl JavaScriptCompiler { .collect::>(), combined_source_map .source_contents() - .flatten() - .map(ToString::to_string) + .map(|byte_str| Arc::from(byte_str.map(ToString::to_string).unwrap_or_default())) .collect::>(), combined_source_map .names() diff --git a/crates/rspack_loader_lightningcss/src/lib.rs b/crates/rspack_loader_lightningcss/src/lib.rs index 79a4075c933c..bc88b16a8488 100644 --- a/crates/rspack_loader_lightningcss/src/lib.rs +++ b/crates/rspack_loader_lightningcss/src/lib.rs @@ -241,7 +241,7 @@ impl LightningCssLoader { source_map .get_sources_content() .iter() - .map(ToString::to_string) + .map(|source_content| Arc::from(source_content.to_string())) .collect::>(), source_map .get_names() diff --git a/crates/rspack_plugin_devtool/Cargo.toml b/crates/rspack_plugin_devtool/Cargo.toml index 59c378e503f9..5edf4f912096 100644 --- a/crates/rspack_plugin_devtool/Cargo.toml +++ b/crates/rspack_plugin_devtool/Cargo.toml @@ -27,6 +27,7 @@ rspack_util = { workspace = true } rustc-hash = { workspace = true } simd-json = { workspace = true } sugar_path = { workspace = true } +thread_local = { workspace = true } tracing = { workspace = true } [package.metadata.cargo-shear] diff --git a/crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs b/crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs index 37546a6903bf..56a6919c647f 100644 --- a/crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs +++ b/crates/rspack_plugin_devtool/src/eval_source_map_dev_tool_plugin.rs @@ -7,7 +7,7 @@ use rspack_core::{ ChunkGraph, ChunkInitFragments, ChunkUkey, Compilation, CompilationAdditionalModuleRuntimeRequirements, CompilationParams, CompilerCompilation, Filename, Module, ModuleIdentifier, PathData, Plugin, RuntimeGlobals, - rspack_sources::{BoxSource, MapOptions, RawStringSource, Source, SourceExt}, + rspack_sources::{BoxSource, MapOptions, ObjectPool, RawStringSource, Source, SourceExt}, }; use rspack_error::Result; use rspack_hash::{RspackHash, RspackHashDigest}; @@ -107,7 +107,9 @@ async fn eval_source_map_devtool_plugin_render_module_content( if let Some(cached_source) = self.cache.get(module_hash) { render_source.source = cached_source.value().clone(); return Ok(()); - } else if let Some(mut map) = origin_source.map(&MapOptions::new(self.columns)) { + } else if let Some(mut map) = + origin_source.map(&ObjectPool::default(), &MapOptions::new(self.columns)) + { let source = { let source = origin_source.source().into_string_lossy(); diff --git a/crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs b/crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs index 5c89f14d5b3a..f35959c69e72 100644 --- a/crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs +++ b/crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs @@ -15,7 +15,7 @@ use rspack_collections::DatabaseItem; use rspack_core::{ AssetInfo, Chunk, ChunkUkey, Compilation, CompilationAsset, CompilationProcessAssets, Filename, Logger, ModuleIdentifier, PathData, Plugin, - rspack_sources::{ConcatSource, MapOptions, RawStringSource, Source, SourceExt}, + rspack_sources::{ConcatSource, MapOptions, ObjectPool, RawStringSource, Source, SourceExt}, }; use rspack_error::{Result, ToStringResultToRspackResultExt, error}; use rspack_hash::RspackHash; @@ -23,6 +23,7 @@ use rspack_hook::{plugin, plugin_hook}; use rspack_util::{asset_condition::AssetConditions, base64, identifier::make_paths_absolute}; use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet}; use sugar_path::SugarPath; +use thread_local::ThreadLocal; use crate::{ ModuleFilenameTemplateFn, ModuleOrSource, generate_debug_id::generate_debug_id, @@ -208,6 +209,7 @@ impl SourceMapDevToolPlugin { let map_options = MapOptions::new(self.columns); let need_match = self.test.is_some() || self.include.is_some() || self.exclude.is_some(); + let tls: ThreadLocal = ThreadLocal::new(); let mut mapped_sources = raw_assets .into_par_iter() .filter_map(|(file, asset)| { @@ -219,7 +221,8 @@ impl SourceMapDevToolPlugin { if is_match { asset.get_source().map(|source| { - let source_map = source.map(&map_options); + let object_pool = tls.get_or(ObjectPool::default); + let source_map = source.map(object_pool, &map_options); (file, source, source_map) }) } else { diff --git a/crates/rspack_plugin_lightning_css_minimizer/Cargo.toml b/crates/rspack_plugin_lightning_css_minimizer/Cargo.toml index 2efed99f017a..1ba6b5e2168d 100644 --- a/crates/rspack_plugin_lightning_css_minimizer/Cargo.toml +++ b/crates/rspack_plugin_lightning_css_minimizer/Cargo.toml @@ -13,6 +13,7 @@ parcel_sourcemap = { workspace = true } rayon = { workspace = true } regex = { workspace = true } ropey = { workspace = true } +thread_local = { workspace = true } tracing = { workspace = true } rspack_core = { workspace = true } diff --git a/crates/rspack_plugin_lightning_css_minimizer/src/lib.rs b/crates/rspack_plugin_lightning_css_minimizer/src/lib.rs index e55dcbb568a5..67888d3cdc08 100644 --- a/crates/rspack_plugin_lightning_css_minimizer/src/lib.rs +++ b/crates/rspack_plugin_lightning_css_minimizer/src/lib.rs @@ -16,13 +16,15 @@ use rspack_core::{ ChunkUkey, Compilation, CompilationChunkHash, CompilationProcessAssets, Plugin, diagnostics::MinifyError, rspack_sources::{ - MapOptions, RawStringSource, SourceExt, SourceMap, SourceMapSource, SourceMapSourceOptions, + MapOptions, ObjectPool, RawStringSource, SourceExt, SourceMap, SourceMapSource, + SourceMapSourceOptions, }, }; use rspack_error::{Diagnostic, Result, ToStringResultToRspackResultExt}; use rspack_hash::RspackHash; use rspack_hook::{plugin, plugin_hook}; use rspack_util::asset_condition::AssetConditions; +use thread_local::ThreadLocal; static CSS_ASSET_REGEXP: LazyLock = LazyLock::new(|| Regex::new(r"\.css(\?.*)?$").expect("Invalid RegExp")); @@ -143,6 +145,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> { let options = &self.options; let minimizer_options = &self.options.minimizer_options; let all_warnings: RwLock> = Default::default(); + + let tls: ThreadLocal = ThreadLocal::new(); compilation .assets_mut() .par_iter_mut() @@ -166,7 +170,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> { if let Some(original_source) = original.get_source() { let input = original_source.source().into_string_lossy().into_owned(); - let input_source_map = original_source.map(&MapOptions::default()); + let object_pool = tls.get_or(ObjectPool::default); + let input_source_map = original_source.map(object_pool, &MapOptions::default()); let mut parser_flags = ParserFlags::empty(); parser_flags.set( @@ -279,7 +284,7 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> { .to_rspack_result()?, ) .expect("should be able to generate source-map"), - original_source: Some(input), + original_source: Some(Arc::from(input)), inner_source_map: input_source_map, remove_original_source: true, }) diff --git a/crates/rspack_plugin_rsdoctor/Cargo.toml b/crates/rspack_plugin_rsdoctor/Cargo.toml index b5cb4c878923..3ce6d603a7a8 100644 --- a/crates/rspack_plugin_rsdoctor/Cargo.toml +++ b/crates/rspack_plugin_rsdoctor/Cargo.toml @@ -20,6 +20,7 @@ rspack_paths = { workspace = true } rspack_plugin_devtool = { workspace = true } rspack_util = { workspace = true } rustc-hash = { workspace = true } +thread_local = { workspace = true } tokio = { workspace = true } tracing = { workspace = true } @@ -27,5 +28,5 @@ tracing = { workspace = true } ignored = ["tracing"] [lints.rust.unexpected_cfgs] -level = "warn" check-cfg = ['cfg(allocative)'] +level = "warn" diff --git a/crates/rspack_plugin_rsdoctor/src/module_graph.rs b/crates/rspack_plugin_rsdoctor/src/module_graph.rs index 9ac2d85cc9cb..225a362b5d52 100644 --- a/crates/rspack_plugin_rsdoctor/src/module_graph.rs +++ b/crates/rspack_plugin_rsdoctor/src/module_graph.rs @@ -4,10 +4,12 @@ use rayon::iter::{IntoParallelRefIterator, ParallelBridge, ParallelIterator}; use rspack_collections::{Identifier, IdentifierMap}; use rspack_core::{ BoxModule, ChunkGraph, Compilation, Context, DependencyId, DependencyType, Module, ModuleGraph, - ModuleIdsArtifact, rspack_sources::MapOptions, + ModuleIdsArtifact, + rspack_sources::{MapOptions, ObjectPool}, }; use rspack_paths::Utf8PathBuf; use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet}; +use thread_local::ThreadLocal; use crate::{ ChunkUkey, ModuleKind, ModuleUkey, RsdoctorDependency, RsdoctorModule, RsdoctorModuleId, @@ -125,6 +127,8 @@ pub fn collect_module_original_sources( compilation: &Compilation, ) -> Vec { let ifs = compilation.input_filesystem.clone(); + + let tls: ThreadLocal = ThreadLocal::new(); modules .par_iter() .filter_map(|(module_id, module)| { @@ -137,9 +141,10 @@ pub fn collect_module_original_sources( }; let module_ukey = module_ukeys.get(module_id)?; let resource = module.resource_resolved_data().resource().to_owned(); + let object_pool = tls.get_or(ObjectPool::default); let source = module .source() - .and_then(|s| s.map(&MapOptions::default())) + .and_then(|s| s.map(object_pool, &MapOptions::default())) .and_then(|s| { let idx = s.sources().iter().position(|s| s.eq(&resource))?; let source = s.sources_content().get(idx)?; diff --git a/crates/rspack_plugin_swc_js_minimizer/Cargo.toml b/crates/rspack_plugin_swc_js_minimizer/Cargo.toml index 174baf30d8da..1b29c064930e 100644 --- a/crates/rspack_plugin_swc_js_minimizer/Cargo.toml +++ b/crates/rspack_plugin_swc_js_minimizer/Cargo.toml @@ -34,4 +34,5 @@ swc_core = { workspace = true, features = [ "ecma_quote", ] } swc_ecma_minifier = { workspace = true, features = ["concurrent"] } +thread_local = { workspace = true } tracing = { workspace = true } diff --git a/crates/rspack_plugin_swc_js_minimizer/src/lib.rs b/crates/rspack_plugin_swc_js_minimizer/src/lib.rs index c0e21a13a076..86cfd8b098c8 100644 --- a/crates/rspack_plugin_swc_js_minimizer/src/lib.rs +++ b/crates/rspack_plugin_swc_js_minimizer/src/lib.rs @@ -14,7 +14,7 @@ use rspack_core::{ CompilerCompilation, Plugin, diagnostics::MinifyError, rspack_sources::{ - ConcatSource, MapOptions, RawStringSource, Source, SourceExt, SourceMapSource, + ConcatSource, MapOptions, ObjectPool, RawStringSource, Source, SourceExt, SourceMapSource, SourceMapSourceOptions, }, }; @@ -33,6 +33,7 @@ pub use swc_ecma_minifier::option::{ MangleOptions, terser::{TerserCompressorOptions, TerserEcmaVersion}, }; +use thread_local::ThreadLocal; const PLUGIN_NAME: &str = "rspack.SwcJsMinimizerRspackPlugin"; @@ -172,6 +173,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> { .unwrap_or_else(|_| panic!("`{condition}` is invalid extractComments condition")) }); let enter_span = tracing::Span::current(); + + let tls: ThreadLocal = ThreadLocal::new(); compilation .assets_mut() .par_iter_mut() @@ -190,7 +193,8 @@ async fn process_assets(&self, compilation: &mut Compilation) -> Result<()> { let filename = filename.split('?').next().expect("Should have filename"); if let Some(original_source) = original.get_source() { let input = original_source.source().into_string_lossy().into_owned(); - let input_source_map = original_source.map(&MapOptions::default()); + let object_pool = tls.get_or(ObjectPool::default); + let input_source_map = original_source.map(object_pool, &MapOptions::default()); let is_module = if let Some(module) = minimizer_options.module { Some(module) diff --git a/tests/rspack-test/statsAPICases/basic.js b/tests/rspack-test/statsAPICases/basic.js index bbd53c5a91ca..d44feb680470 100644 --- a/tests/rspack-test/statsAPICases/basic.js +++ b/tests/rspack-test/statsAPICases/basic.js @@ -18,305 +18,305 @@ module.exports = { }; expect(typeof stats?.hash).toBe("string"); expect(stats?.toJson(statsOptions)).toMatchInlineSnapshot(` - Object { - assets: Array [ - Object { - auxiliaryChunkIdHints: Array [], - auxiliaryChunkNames: Array [], - auxiliaryChunks: Array [], - cached: false, - chunkIdHints: Array [], - chunkNames: Array [ - main, - ], - chunks: Array [ - 889, - ], - emitted: true, - filteredRelated: 0, - info: Object { - chunkhash: Array [], - contenthash: Array [], - fullhash: Array [], - isOverSizeLimit: false, - javascriptModule: false, - minimized: true, - related: Object {}, - }, - isOverSizeLimit: false, - name: main.js, - related: Array [], - size: 204, - type: asset, - }, - ], - assetsByChunkName: Object { - main: Array [ - main.js, - ], - }, - children: Array [], - chunks: Array [ - Object { - auxiliaryFiles: Array [], - children: Array [], - childrenByOrder: Object {}, - entry: true, - files: Array [ - main.js, - ], - filteredModules: undefined, - hash: 8c119b10eb3bf1e9, - id: 889, - idHints: Array [], - initial: true, - modules: Array [ - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: false, - depth: 0, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 195, - identifier: /fixtures/a.js, - index: 0, - index2: 0, - issuer: undefined, - issuerId: undefined, - issuerName: undefined, - issuerPath: undefined, - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 0, - preOrderIndex: 0, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: null, - resolvedModuleId: null, - type: entry, - userRequest: ./fixtures/a, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 195, - moduleIdentifier: /fixtures/a.js, - moduleName: ./fixtures/a.js, - resolvedModule: ./fixtures/a.js, - resolvedModuleId: 195, - resolvedModuleIdentifier: /fixtures/a.js, - type: cjs self exports reference, - userRequest: self, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - ], - names: Array [ - main, - ], - origins: Array [ - Object { - loc: main, - module: , - moduleId: undefined, - moduleIdentifier: , - moduleName: , - request: ./fixtures/a, - }, - ], - parents: Array [], - reason: undefined, - rendered: true, - runtime: Array [ - main, - ], - siblings: Array [], - size: 55, - sizes: Object { - javascript: 55, - }, - type: chunk, - }, - ], - entrypoints: Object { - main: Object { - assets: Array [ - Object { - name: main.js, - size: 204, - }, - ], - assetsSize: 204, - auxiliaryAssets: Array [], - auxiliaryAssetsSize: 0, - childAssets: Object {}, - children: Object {}, - chunks: Array [ - 889, - ], - filteredAssets: 0, - isOverSizeLimit: false, - name: main, - }, - }, - env: undefined, - errors: Array [], - errorsCount: 0, - filteredAssets: undefined, - filteredModules: undefined, - hash: 73a5752d7bf35dcd, - modules: Array [ - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - depth: 0, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 195, - identifier: /fixtures/a.js, - index: 0, - index2: 0, - issuer: undefined, - issuerId: undefined, - issuerName: undefined, - issuerPath: undefined, - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 0, - preOrderIndex: 0, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: null, - resolvedModuleId: null, - type: entry, - userRequest: ./fixtures/a, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 195, - moduleIdentifier: /fixtures/a.js, - moduleName: ./fixtures/a.js, - resolvedModule: ./fixtures/a.js, - resolvedModuleId: 195, - resolvedModuleIdentifier: /fixtures/a.js, - type: cjs self exports reference, - userRequest: self, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - ], - namedChunkGroups: Object { - main: Object { - assets: Array [ - Object { - name: main.js, - size: 204, - }, - ], - assetsSize: 204, - auxiliaryAssets: Array [], - auxiliaryAssetsSize: 0, - childAssets: Object {}, - children: Object {}, - chunks: Array [ - 889, - ], - filteredAssets: 0, - isOverSizeLimit: false, - name: main, - }, - }, - outputPath: /dist, - publicPath: auto, - warnings: Array [], - warningsCount: 0, - } - `); + Object { + assets: Array [ + Object { + auxiliaryChunkIdHints: Array [], + auxiliaryChunkNames: Array [], + auxiliaryChunks: Array [], + cached: false, + chunkIdHints: Array [], + chunkNames: Array [ + main, + ], + chunks: Array [ + 889, + ], + emitted: true, + filteredRelated: 0, + info: Object { + chunkhash: Array [], + contenthash: Array [], + fullhash: Array [], + isOverSizeLimit: false, + javascriptModule: false, + minimized: true, + related: Object {}, + }, + isOverSizeLimit: false, + name: main.js, + related: Array [], + size: 204, + type: asset, + }, + ], + assetsByChunkName: Object { + main: Array [ + main.js, + ], + }, + children: Array [], + chunks: Array [ + Object { + auxiliaryFiles: Array [], + children: Array [], + childrenByOrder: Object {}, + entry: true, + files: Array [ + main.js, + ], + filteredModules: undefined, + hash: 23469efbff8aa6fe, + id: 889, + idHints: Array [], + initial: true, + modules: Array [ + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: false, + depth: 0, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 195, + identifier: /fixtures/a.js, + index: 0, + index2: 0, + issuer: undefined, + issuerId: undefined, + issuerName: undefined, + issuerPath: undefined, + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 0, + preOrderIndex: 0, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: null, + resolvedModuleId: null, + type: entry, + userRequest: ./fixtures/a, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 195, + moduleIdentifier: /fixtures/a.js, + moduleName: ./fixtures/a.js, + resolvedModule: ./fixtures/a.js, + resolvedModuleId: 195, + resolvedModuleIdentifier: /fixtures/a.js, + type: cjs self exports reference, + userRequest: self, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + ], + names: Array [ + main, + ], + origins: Array [ + Object { + loc: main, + module: , + moduleId: undefined, + moduleIdentifier: , + moduleName: , + request: ./fixtures/a, + }, + ], + parents: Array [], + reason: undefined, + rendered: true, + runtime: Array [ + main, + ], + siblings: Array [], + size: 55, + sizes: Object { + javascript: 55, + }, + type: chunk, + }, + ], + entrypoints: Object { + main: Object { + assets: Array [ + Object { + name: main.js, + size: 204, + }, + ], + assetsSize: 204, + auxiliaryAssets: Array [], + auxiliaryAssetsSize: 0, + childAssets: Object {}, + children: Object {}, + chunks: Array [ + 889, + ], + filteredAssets: 0, + isOverSizeLimit: false, + name: main, + }, + }, + env: undefined, + errors: Array [], + errorsCount: 0, + filteredAssets: undefined, + filteredModules: undefined, + hash: 4bc91edf80f73f9b, + modules: Array [ + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + depth: 0, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 195, + identifier: /fixtures/a.js, + index: 0, + index2: 0, + issuer: undefined, + issuerId: undefined, + issuerName: undefined, + issuerPath: undefined, + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 0, + preOrderIndex: 0, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: null, + resolvedModuleId: null, + type: entry, + userRequest: ./fixtures/a, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 195, + moduleIdentifier: /fixtures/a.js, + moduleName: ./fixtures/a.js, + resolvedModule: ./fixtures/a.js, + resolvedModuleId: 195, + resolvedModuleIdentifier: /fixtures/a.js, + type: cjs self exports reference, + userRequest: self, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + ], + namedChunkGroups: Object { + main: Object { + assets: Array [ + Object { + name: main.js, + size: 204, + }, + ], + assetsSize: 204, + auxiliaryAssets: Array [], + auxiliaryAssetsSize: 0, + childAssets: Object {}, + children: Object {}, + chunks: Array [ + 889, + ], + filteredAssets: 0, + isOverSizeLimit: false, + name: main, + }, + }, + outputPath: /dist, + publicPath: auto, + warnings: Array [], + warningsCount: 0, + } + `); expect(stats?.toString(statsOptions)).toMatchInlineSnapshot(` - PublicPath: auto - asset main.js 204 bytes {889} [emitted] (name: main) - Entrypoint main 204 bytes = main.js - chunk {889} (runtime: main) main.js (main) 55 bytes [entry] [rendered] - > ./fixtures/a main - ./fixtures/a.js [195] 55 bytes {889} [depth 0] [built] [code generated] - [used exports unknown] - Statement with side_effects in source code at ./fixtures/a.js - ModuleConcatenation bailout: Module is not an ECMAScript module - entry ./fixtures/a - cjs self exports reference self [195] ./fixtures/a.js - ./fixtures/a.js [195] 55 bytes {889} [depth 0] [built] [code generated] - [used exports unknown] - Statement with side_effects in source code at ./fixtures/a.js - ModuleConcatenation bailout: Module is not an ECMAScript module - entry ./fixtures/a - cjs self exports reference self [195] ./fixtures/a.js - - Rspack compiled successfully (73a5752d7bf35dcd) - `); + PublicPath: auto + asset main.js 204 bytes {889} [emitted] (name: main) + Entrypoint main 204 bytes = main.js + chunk {889} (runtime: main) main.js (main) 55 bytes [entry] [rendered] + > ./fixtures/a main + ./fixtures/a.js [195] 55 bytes {889} [depth 0] [built] [code generated] + [used exports unknown] + Statement with side_effects in source code at ./fixtures/a.js + ModuleConcatenation bailout: Module is not an ECMAScript module + entry ./fixtures/a + cjs self exports reference self [195] ./fixtures/a.js + ./fixtures/a.js [195] 55 bytes {889} [depth 0] [built] [code generated] + [used exports unknown] + Statement with side_effects in source code at ./fixtures/a.js + ModuleConcatenation bailout: Module is not an ECMAScript module + entry ./fixtures/a + cjs self exports reference self [195] ./fixtures/a.js + + Rspack compiled successfully (4bc91edf80f73f9b) + `); } }; diff --git a/tests/rspack-test/statsAPICases/exports.js b/tests/rspack-test/statsAPICases/exports.js index a1bd1d500746..154fc267f8c0 100644 --- a/tests/rspack-test/statsAPICases/exports.js +++ b/tests/rspack-test/statsAPICases/exports.js @@ -71,7 +71,7 @@ module.exports = { main.js, ], filteredModules: undefined, - hash: ac11555a8a0fd2a9, + hash: 32ce5ab90b143d0b, id: 889, idHints: Array [], initial: true, @@ -459,7 +459,7 @@ module.exports = { errorsCount: 0, filteredAssets: undefined, filteredModules: undefined, - hash: 9ba974575f150ee8, + hash: ce481cc551e582cc, modules: Array [ Object { assets: Array [], diff --git a/tests/rspack-test/statsAPICases/ids.js b/tests/rspack-test/statsAPICases/ids.js index 78a487cea1da..ea57a97a3532 100644 --- a/tests/rspack-test/statsAPICases/ids.js +++ b/tests/rspack-test/statsAPICases/ids.js @@ -16,108 +16,108 @@ module.exports = { ids: true }; expect(stats?.toJson(options)).toMatchInlineSnapshot(` - Object { - assets: Array [ - Object { - auxiliaryChunkIdHints: Array [], - auxiliaryChunkNames: Array [], - auxiliaryChunks: Array [], - cached: false, - chunkIdHints: Array [], - chunkNames: Array [ - main, - ], - chunks: Array [ - 889, - ], - emitted: true, - info: Object { - chunkhash: Array [], - contenthash: Array [], - fullhash: Array [], - isOverSizeLimit: false, - javascriptModule: false, - minimized: true, - related: Object {}, - }, - name: main.js, - size: 204, - type: asset, - }, - ], - assetsByChunkName: Object { - main: Array [ - main.js, - ], - }, - chunks: Array [ - Object { - auxiliaryFiles: Array [], - childrenByOrder: Object {}, - entry: true, - files: Array [ - main.js, - ], - hash: 8c119b10eb3bf1e9, - id: 889, - idHints: Array [], - initial: true, - names: Array [ - main, - ], - reason: undefined, - rendered: true, - runtime: Array [ - main, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - type: chunk, - }, - ], - filteredAssets: undefined, - filteredModules: undefined, - modules: Array [ - Object { - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - errors: 0, - failed: false, - id: 195, - identifier: /fixtures/a.js, - index: 0, - index2: 0, - issuer: undefined, - issuerId: undefined, - issuerName: undefined, - issuerPath: undefined, - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js, - nameForCondition: /fixtures/a.js, - optional: false, - orphan: false, - postOrderIndex: 0, - preOrderIndex: 0, - size: 55, - sizes: Object { - javascript: 55, - }, - type: module, - warnings: 0, - }, - ], - } - `); + Object { + assets: Array [ + Object { + auxiliaryChunkIdHints: Array [], + auxiliaryChunkNames: Array [], + auxiliaryChunks: Array [], + cached: false, + chunkIdHints: Array [], + chunkNames: Array [ + main, + ], + chunks: Array [ + 889, + ], + emitted: true, + info: Object { + chunkhash: Array [], + contenthash: Array [], + fullhash: Array [], + isOverSizeLimit: false, + javascriptModule: false, + minimized: true, + related: Object {}, + }, + name: main.js, + size: 204, + type: asset, + }, + ], + assetsByChunkName: Object { + main: Array [ + main.js, + ], + }, + chunks: Array [ + Object { + auxiliaryFiles: Array [], + childrenByOrder: Object {}, + entry: true, + files: Array [ + main.js, + ], + hash: 23469efbff8aa6fe, + id: 889, + idHints: Array [], + initial: true, + names: Array [ + main, + ], + reason: undefined, + rendered: true, + runtime: Array [ + main, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + type: chunk, + }, + ], + filteredAssets: undefined, + filteredModules: undefined, + modules: Array [ + Object { + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + errors: 0, + failed: false, + id: 195, + identifier: /fixtures/a.js, + index: 0, + index2: 0, + issuer: undefined, + issuerId: undefined, + issuerName: undefined, + issuerPath: undefined, + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js, + nameForCondition: /fixtures/a.js, + optional: false, + orphan: false, + postOrderIndex: 0, + preOrderIndex: 0, + size: 55, + sizes: Object { + javascript: 55, + }, + type: module, + warnings: 0, + }, + ], + } + `); expect(stats?.toString(options)).toMatchInlineSnapshot(` asset main.js 204 bytes {889} [emitted] (name: main) chunk {889} (runtime: main) main.js (main) 55 bytes [entry] [rendered] diff --git a/tests/rspack-test/statsAPICases/with-query.js b/tests/rspack-test/statsAPICases/with-query.js index c5d4d10d58bd..41112ee8f6bc 100644 --- a/tests/rspack-test/statsAPICases/with-query.js +++ b/tests/rspack-test/statsAPICases/with-query.js @@ -15,762 +15,762 @@ module.exports = { version: false }; expect(stats?.toJson(statsOptions)).toMatchInlineSnapshot(` - Object { - assets: Array [ - Object { - auxiliaryChunkIdHints: Array [], - auxiliaryChunkNames: Array [], - auxiliaryChunks: Array [], - cached: false, - chunkIdHints: Array [], - chunkNames: Array [ - main, - ], - chunks: Array [ - 889, - ], - emitted: true, - filteredRelated: 0, - info: Object { - chunkhash: Array [], - contenthash: Array [], - fullhash: Array [], - isOverSizeLimit: false, - javascriptModule: false, - minimized: true, - related: Object {}, - }, - isOverSizeLimit: false, - name: main.js, - related: Array [], - size: 337, - type: asset, - }, - ], - assetsByChunkName: Object { - main: Array [ - main.js, - ], - }, - children: Array [], - chunks: Array [ - Object { - auxiliaryFiles: Array [], - children: Array [], - childrenByOrder: Object {}, - entry: true, - files: Array [ - main.js, - ], - filteredModules: undefined, - hash: 0c401b8ad6c9483e, - id: 889, - idHints: Array [], - initial: true, - modules: Array [ - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: true, - depth: 2, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 195, - identifier: /fixtures/a.js, - index: 3, - index2: 1, - issuer: /fixtures/c.js?c=3, - issuerId: 679, - issuerName: ./fixtures/c.js?c=3, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - Object { - id: 679, - identifier: /fixtures/c.js?c=3, - name: ./fixtures/c.js?c=3, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 1, - preOrderIndex: 3, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 195, - moduleIdentifier: /fixtures/a.js, - moduleName: ./fixtures/a.js, - resolvedModule: ./fixtures/a.js, - resolvedModuleId: 195, - resolvedModuleIdentifier: /fixtures/a.js, - type: cjs self exports reference, - userRequest: self, - }, - Object { - active: true, - explanation: undefined, - loc: 2:12-17, - moduleId: 679, - moduleIdentifier: /fixtures/c.js?c=3, - moduleName: ./fixtures/c.js?c=3, - resolvedModule: ./fixtures/c.js?c=3, - resolvedModuleId: 679, - resolvedModuleIdentifier: /fixtures/c.js?c=3, - type: cjs require, - userRequest: ./a, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: true, - depth: 1, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 133, - identifier: /fixtures/a.js?a=1, - index: 1, - index2: 0, - issuer: /fixtures/abc-query.js, - issuerId: 305, - issuerName: ./fixtures/abc-query.js, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js?a=1, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js?a=1, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 0, - preOrderIndex: 1, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 133, - moduleIdentifier: /fixtures/a.js?a=1, - moduleName: ./fixtures/a.js?a=1, - resolvedModule: ./fixtures/a.js?a=1, - resolvedModuleId: 133, - resolvedModuleIdentifier: /fixtures/a.js?a=1, - type: cjs self exports reference, - userRequest: self, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 305, - moduleIdentifier: /fixtures/abc-query.js, - moduleName: ./fixtures/abc-query.js, - resolvedModule: ./fixtures/abc-query.js, - resolvedModuleId: 305, - resolvedModuleIdentifier: /fixtures/abc-query.js, - type: cjs export require, - userRequest: ./a?a=1, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: false, - depth: 0, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 305, - identifier: /fixtures/abc-query.js, - index: 0, - index2: 3, - issuer: undefined, - issuerId: undefined, - issuerName: undefined, - issuerPath: undefined, - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/abc-query.js, - nameForCondition: /fixtures/abc-query.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/abc-query.js-31, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 3, - preOrderIndex: 0, - providedExports: Array [ - a, - c, - ], - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: null, - resolvedModuleId: null, - type: entry, - userRequest: ./fixtures/abc-query, - }, - ], - size: 99, - sizes: Object { - javascript: 99, - }, - source: exports.a = require("./a?a=1"); - // exports.b = require("./b?b=2"); - exports.c = require("./c?c=3");, - type: module, - usedExports: Array [], - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: true, - depth: 1, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 679, - identifier: /fixtures/c.js?c=3, - index: 2, - index2: 2, - issuer: /fixtures/abc-query.js, - issuerId: 305, - issuerName: ./fixtures/abc-query.js, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/c.js?c=3, - nameForCondition: /fixtures/c.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/c.js?c=3, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 2, - preOrderIndex: 2, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 305, - moduleIdentifier: /fixtures/abc-query.js, - moduleName: ./fixtures/abc-query.js, - resolvedModule: ./fixtures/abc-query.js, - resolvedModuleId: 305, - resolvedModuleIdentifier: /fixtures/abc-query.js, - type: cjs export require, - userRequest: ./c?c=3, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 679, - moduleIdentifier: /fixtures/c.js?c=3, - moduleName: ./fixtures/c.js?c=3, - resolvedModule: ./fixtures/c.js?c=3, - resolvedModuleId: 679, - resolvedModuleIdentifier: /fixtures/c.js?c=3, - type: cjs self exports reference, - userRequest: self, - }, - ], - size: 72, - sizes: Object { - javascript: 72, - }, - source: module.exports = function b() { - require("./a"); - return "This is c"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - ], - names: Array [ - main, - ], - origins: Array [ - Object { - loc: main, - module: , - moduleId: undefined, - moduleIdentifier: , - moduleName: , - request: ./fixtures/abc-query, - }, - ], - parents: Array [], - reason: undefined, - rendered: true, - runtime: Array [ - main, - ], - siblings: Array [], - size: 281, - sizes: Object { - javascript: 281, - }, - type: chunk, - }, - ], - entrypoints: Object { - main: Object { - assets: Array [ - Object { - name: main.js, - size: 337, - }, - ], - assetsSize: 337, - auxiliaryAssets: Array [], - auxiliaryAssetsSize: 0, - childAssets: Object {}, - children: Object {}, - chunks: Array [ - 889, - ], - filteredAssets: 0, - isOverSizeLimit: false, - name: main, - }, - }, - env: undefined, - errors: Array [], - errorsCount: 0, - filteredAssets: undefined, - filteredModules: undefined, - hash: deb74c26285bb109, - modules: Array [ - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - depth: 0, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 305, - identifier: /fixtures/abc-query.js, - index: 0, - index2: 3, - issuer: undefined, - issuerId: undefined, - issuerName: undefined, - issuerPath: undefined, - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/abc-query.js, - nameForCondition: /fixtures/abc-query.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/abc-query.js-31, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 3, - preOrderIndex: 0, - providedExports: Array [ - a, - c, - ], - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: null, - resolvedModuleId: null, - type: entry, - userRequest: ./fixtures/abc-query, - }, - ], - size: 99, - sizes: Object { - javascript: 99, - }, - source: exports.a = require("./a?a=1"); - // exports.b = require("./b?b=2"); - exports.c = require("./c?c=3");, - type: module, - usedExports: Array [], - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - depth: 1, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 133, - identifier: /fixtures/a.js?a=1, - index: 1, - index2: 0, - issuer: /fixtures/abc-query.js, - issuerId: 305, - issuerName: ./fixtures/abc-query.js, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js?a=1, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js?a=1, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 0, - preOrderIndex: 1, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 133, - moduleIdentifier: /fixtures/a.js?a=1, - moduleName: ./fixtures/a.js?a=1, - resolvedModule: ./fixtures/a.js?a=1, - resolvedModuleId: 133, - resolvedModuleIdentifier: /fixtures/a.js?a=1, - type: cjs self exports reference, - userRequest: self, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 305, - moduleIdentifier: /fixtures/abc-query.js, - moduleName: ./fixtures/abc-query.js, - resolvedModule: ./fixtures/abc-query.js, - resolvedModuleId: 305, - resolvedModuleIdentifier: /fixtures/abc-query.js, - type: cjs export require, - userRequest: ./a?a=1, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - depth: 1, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 679, - identifier: /fixtures/c.js?c=3, - index: 2, - index2: 2, - issuer: /fixtures/abc-query.js, - issuerId: 305, - issuerName: ./fixtures/abc-query.js, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/c.js?c=3, - nameForCondition: /fixtures/c.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/c.js?c=3, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 2, - preOrderIndex: 2, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 305, - moduleIdentifier: /fixtures/abc-query.js, - moduleName: ./fixtures/abc-query.js, - resolvedModule: ./fixtures/abc-query.js, - resolvedModuleId: 305, - resolvedModuleIdentifier: /fixtures/abc-query.js, - type: cjs export require, - userRequest: ./c?c=3, - }, - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 679, - moduleIdentifier: /fixtures/c.js?c=3, - moduleName: ./fixtures/c.js?c=3, - resolvedModule: ./fixtures/c.js?c=3, - resolvedModuleId: 679, - resolvedModuleIdentifier: /fixtures/c.js?c=3, - type: cjs self exports reference, - userRequest: self, - }, - ], - size: 72, - sizes: Object { - javascript: 72, - }, - source: module.exports = function b() { - require("./a"); - return "This is c"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - Object { - assets: Array [], - buildTimeExecuted: false, - built: true, - cacheable: true, - cached: false, - chunks: Array [ - 889, - ], - codeGenerated: true, - dependent: undefined, - depth: 2, - errors: 0, - failed: false, - filteredReasons: undefined, - id: 195, - identifier: /fixtures/a.js, - index: 3, - index2: 1, - issuer: /fixtures/c.js?c=3, - issuerId: 679, - issuerName: ./fixtures/c.js?c=3, - issuerPath: Array [ - Object { - id: 305, - identifier: /fixtures/abc-query.js, - name: ./fixtures/abc-query.js, - }, - Object { - id: 679, - identifier: /fixtures/c.js?c=3, - name: ./fixtures/c.js?c=3, - }, - ], - layer: undefined, - moduleType: javascript/auto, - name: ./fixtures/a.js, - nameForCondition: /fixtures/a.js, - optimizationBailout: Array [ - Statement with side_effects in source code at ./fixtures/a.js, - ModuleConcatenation bailout: Module is not an ECMAScript module, - ], - optional: false, - orphan: false, - postOrderIndex: 1, - preOrderIndex: 3, - providedExports: null, - reasons: Array [ - Object { - active: true, - explanation: undefined, - loc: undefined, - moduleId: 195, - moduleIdentifier: /fixtures/a.js, - moduleName: ./fixtures/a.js, - resolvedModule: ./fixtures/a.js, - resolvedModuleId: 195, - resolvedModuleIdentifier: /fixtures/a.js, - type: cjs self exports reference, - userRequest: self, - }, - Object { - active: true, - explanation: undefined, - loc: 2:12-17, - moduleId: 679, - moduleIdentifier: /fixtures/c.js?c=3, - moduleName: ./fixtures/c.js?c=3, - resolvedModule: ./fixtures/c.js?c=3, - resolvedModuleId: 679, - resolvedModuleIdentifier: /fixtures/c.js?c=3, - type: cjs require, - userRequest: ./a, - }, - ], - size: 55, - sizes: Object { - javascript: 55, - }, - source: module.exports = function a() { - return "This is a"; - };, - type: module, - usedExports: null, - warnings: 0, - }, - ], - namedChunkGroups: Object { - main: Object { - assets: Array [ - Object { - name: main.js, - size: 337, - }, - ], - assetsSize: 337, - auxiliaryAssets: Array [], - auxiliaryAssetsSize: 0, - childAssets: Object {}, - children: Object {}, - chunks: Array [ - 889, - ], - filteredAssets: 0, - isOverSizeLimit: false, - name: main, - }, - }, - outputPath: /dist, - publicPath: auto, - warnings: Array [], - warningsCount: 0, - } - `); + Object { + assets: Array [ + Object { + auxiliaryChunkIdHints: Array [], + auxiliaryChunkNames: Array [], + auxiliaryChunks: Array [], + cached: false, + chunkIdHints: Array [], + chunkNames: Array [ + main, + ], + chunks: Array [ + 889, + ], + emitted: true, + filteredRelated: 0, + info: Object { + chunkhash: Array [], + contenthash: Array [], + fullhash: Array [], + isOverSizeLimit: false, + javascriptModule: false, + minimized: true, + related: Object {}, + }, + isOverSizeLimit: false, + name: main.js, + related: Array [], + size: 337, + type: asset, + }, + ], + assetsByChunkName: Object { + main: Array [ + main.js, + ], + }, + children: Array [], + chunks: Array [ + Object { + auxiliaryFiles: Array [], + children: Array [], + childrenByOrder: Object {}, + entry: true, + files: Array [ + main.js, + ], + filteredModules: undefined, + hash: 865704a05c39c7a5, + id: 889, + idHints: Array [], + initial: true, + modules: Array [ + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: true, + depth: 2, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 195, + identifier: /fixtures/a.js, + index: 3, + index2: 1, + issuer: /fixtures/c.js?c=3, + issuerId: 679, + issuerName: ./fixtures/c.js?c=3, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + Object { + id: 679, + identifier: /fixtures/c.js?c=3, + name: ./fixtures/c.js?c=3, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 1, + preOrderIndex: 3, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 195, + moduleIdentifier: /fixtures/a.js, + moduleName: ./fixtures/a.js, + resolvedModule: ./fixtures/a.js, + resolvedModuleId: 195, + resolvedModuleIdentifier: /fixtures/a.js, + type: cjs self exports reference, + userRequest: self, + }, + Object { + active: true, + explanation: undefined, + loc: 2:12-17, + moduleId: 679, + moduleIdentifier: /fixtures/c.js?c=3, + moduleName: ./fixtures/c.js?c=3, + resolvedModule: ./fixtures/c.js?c=3, + resolvedModuleId: 679, + resolvedModuleIdentifier: /fixtures/c.js?c=3, + type: cjs require, + userRequest: ./a, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: true, + depth: 1, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 133, + identifier: /fixtures/a.js?a=1, + index: 1, + index2: 0, + issuer: /fixtures/abc-query.js, + issuerId: 305, + issuerName: ./fixtures/abc-query.js, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js?a=1, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js?a=1, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 0, + preOrderIndex: 1, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 133, + moduleIdentifier: /fixtures/a.js?a=1, + moduleName: ./fixtures/a.js?a=1, + resolvedModule: ./fixtures/a.js?a=1, + resolvedModuleId: 133, + resolvedModuleIdentifier: /fixtures/a.js?a=1, + type: cjs self exports reference, + userRequest: self, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 305, + moduleIdentifier: /fixtures/abc-query.js, + moduleName: ./fixtures/abc-query.js, + resolvedModule: ./fixtures/abc-query.js, + resolvedModuleId: 305, + resolvedModuleIdentifier: /fixtures/abc-query.js, + type: cjs export require, + userRequest: ./a?a=1, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: false, + depth: 0, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 305, + identifier: /fixtures/abc-query.js, + index: 0, + index2: 3, + issuer: undefined, + issuerId: undefined, + issuerName: undefined, + issuerPath: undefined, + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/abc-query.js, + nameForCondition: /fixtures/abc-query.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/abc-query.js-31, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 3, + preOrderIndex: 0, + providedExports: Array [ + a, + c, + ], + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: null, + resolvedModuleId: null, + type: entry, + userRequest: ./fixtures/abc-query, + }, + ], + size: 99, + sizes: Object { + javascript: 99, + }, + source: exports.a = require("./a?a=1"); + // exports.b = require("./b?b=2"); + exports.c = require("./c?c=3");, + type: module, + usedExports: Array [], + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: true, + depth: 1, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 679, + identifier: /fixtures/c.js?c=3, + index: 2, + index2: 2, + issuer: /fixtures/abc-query.js, + issuerId: 305, + issuerName: ./fixtures/abc-query.js, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/c.js?c=3, + nameForCondition: /fixtures/c.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/c.js?c=3, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 2, + preOrderIndex: 2, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 305, + moduleIdentifier: /fixtures/abc-query.js, + moduleName: ./fixtures/abc-query.js, + resolvedModule: ./fixtures/abc-query.js, + resolvedModuleId: 305, + resolvedModuleIdentifier: /fixtures/abc-query.js, + type: cjs export require, + userRequest: ./c?c=3, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 679, + moduleIdentifier: /fixtures/c.js?c=3, + moduleName: ./fixtures/c.js?c=3, + resolvedModule: ./fixtures/c.js?c=3, + resolvedModuleId: 679, + resolvedModuleIdentifier: /fixtures/c.js?c=3, + type: cjs self exports reference, + userRequest: self, + }, + ], + size: 72, + sizes: Object { + javascript: 72, + }, + source: module.exports = function b() { + require("./a"); + return "This is c"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + ], + names: Array [ + main, + ], + origins: Array [ + Object { + loc: main, + module: , + moduleId: undefined, + moduleIdentifier: , + moduleName: , + request: ./fixtures/abc-query, + }, + ], + parents: Array [], + reason: undefined, + rendered: true, + runtime: Array [ + main, + ], + siblings: Array [], + size: 281, + sizes: Object { + javascript: 281, + }, + type: chunk, + }, + ], + entrypoints: Object { + main: Object { + assets: Array [ + Object { + name: main.js, + size: 337, + }, + ], + assetsSize: 337, + auxiliaryAssets: Array [], + auxiliaryAssetsSize: 0, + childAssets: Object {}, + children: Object {}, + chunks: Array [ + 889, + ], + filteredAssets: 0, + isOverSizeLimit: false, + name: main, + }, + }, + env: undefined, + errors: Array [], + errorsCount: 0, + filteredAssets: undefined, + filteredModules: undefined, + hash: 3f615b2aad754390, + modules: Array [ + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + depth: 0, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 305, + identifier: /fixtures/abc-query.js, + index: 0, + index2: 3, + issuer: undefined, + issuerId: undefined, + issuerName: undefined, + issuerPath: undefined, + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/abc-query.js, + nameForCondition: /fixtures/abc-query.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/abc-query.js-31, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 3, + preOrderIndex: 0, + providedExports: Array [ + a, + c, + ], + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: null, + resolvedModuleId: null, + type: entry, + userRequest: ./fixtures/abc-query, + }, + ], + size: 99, + sizes: Object { + javascript: 99, + }, + source: exports.a = require("./a?a=1"); + // exports.b = require("./b?b=2"); + exports.c = require("./c?c=3");, + type: module, + usedExports: Array [], + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + depth: 1, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 133, + identifier: /fixtures/a.js?a=1, + index: 1, + index2: 0, + issuer: /fixtures/abc-query.js, + issuerId: 305, + issuerName: ./fixtures/abc-query.js, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js?a=1, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js?a=1, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 0, + preOrderIndex: 1, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 133, + moduleIdentifier: /fixtures/a.js?a=1, + moduleName: ./fixtures/a.js?a=1, + resolvedModule: ./fixtures/a.js?a=1, + resolvedModuleId: 133, + resolvedModuleIdentifier: /fixtures/a.js?a=1, + type: cjs self exports reference, + userRequest: self, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 305, + moduleIdentifier: /fixtures/abc-query.js, + moduleName: ./fixtures/abc-query.js, + resolvedModule: ./fixtures/abc-query.js, + resolvedModuleId: 305, + resolvedModuleIdentifier: /fixtures/abc-query.js, + type: cjs export require, + userRequest: ./a?a=1, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + depth: 1, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 679, + identifier: /fixtures/c.js?c=3, + index: 2, + index2: 2, + issuer: /fixtures/abc-query.js, + issuerId: 305, + issuerName: ./fixtures/abc-query.js, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/c.js?c=3, + nameForCondition: /fixtures/c.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/c.js?c=3, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 2, + preOrderIndex: 2, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 305, + moduleIdentifier: /fixtures/abc-query.js, + moduleName: ./fixtures/abc-query.js, + resolvedModule: ./fixtures/abc-query.js, + resolvedModuleId: 305, + resolvedModuleIdentifier: /fixtures/abc-query.js, + type: cjs export require, + userRequest: ./c?c=3, + }, + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 679, + moduleIdentifier: /fixtures/c.js?c=3, + moduleName: ./fixtures/c.js?c=3, + resolvedModule: ./fixtures/c.js?c=3, + resolvedModuleId: 679, + resolvedModuleIdentifier: /fixtures/c.js?c=3, + type: cjs self exports reference, + userRequest: self, + }, + ], + size: 72, + sizes: Object { + javascript: 72, + }, + source: module.exports = function b() { + require("./a"); + return "This is c"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + Object { + assets: Array [], + buildTimeExecuted: false, + built: true, + cacheable: true, + cached: false, + chunks: Array [ + 889, + ], + codeGenerated: true, + dependent: undefined, + depth: 2, + errors: 0, + failed: false, + filteredReasons: undefined, + id: 195, + identifier: /fixtures/a.js, + index: 3, + index2: 1, + issuer: /fixtures/c.js?c=3, + issuerId: 679, + issuerName: ./fixtures/c.js?c=3, + issuerPath: Array [ + Object { + id: 305, + identifier: /fixtures/abc-query.js, + name: ./fixtures/abc-query.js, + }, + Object { + id: 679, + identifier: /fixtures/c.js?c=3, + name: ./fixtures/c.js?c=3, + }, + ], + layer: undefined, + moduleType: javascript/auto, + name: ./fixtures/a.js, + nameForCondition: /fixtures/a.js, + optimizationBailout: Array [ + Statement with side_effects in source code at ./fixtures/a.js, + ModuleConcatenation bailout: Module is not an ECMAScript module, + ], + optional: false, + orphan: false, + postOrderIndex: 1, + preOrderIndex: 3, + providedExports: null, + reasons: Array [ + Object { + active: true, + explanation: undefined, + loc: undefined, + moduleId: 195, + moduleIdentifier: /fixtures/a.js, + moduleName: ./fixtures/a.js, + resolvedModule: ./fixtures/a.js, + resolvedModuleId: 195, + resolvedModuleIdentifier: /fixtures/a.js, + type: cjs self exports reference, + userRequest: self, + }, + Object { + active: true, + explanation: undefined, + loc: 2:12-17, + moduleId: 679, + moduleIdentifier: /fixtures/c.js?c=3, + moduleName: ./fixtures/c.js?c=3, + resolvedModule: ./fixtures/c.js?c=3, + resolvedModuleId: 679, + resolvedModuleIdentifier: /fixtures/c.js?c=3, + type: cjs require, + userRequest: ./a, + }, + ], + size: 55, + sizes: Object { + javascript: 55, + }, + source: module.exports = function a() { + return "This is a"; + };, + type: module, + usedExports: null, + warnings: 0, + }, + ], + namedChunkGroups: Object { + main: Object { + assets: Array [ + Object { + name: main.js, + size: 337, + }, + ], + assetsSize: 337, + auxiliaryAssets: Array [], + auxiliaryAssetsSize: 0, + childAssets: Object {}, + children: Object {}, + chunks: Array [ + 889, + ], + filteredAssets: 0, + isOverSizeLimit: false, + name: main, + }, + }, + outputPath: /dist, + publicPath: auto, + warnings: Array [], + warningsCount: 0, + } + `); } }; diff --git a/tests/rspack-test/statsOutputCases/auxiliary-files-test/__snapshots__/stats.txt b/tests/rspack-test/statsOutputCases/auxiliary-files-test/__snapshots__/stats.txt index 974e60e926fa..e00dfb3f515d 100644 --- a/tests/rspack-test/statsOutputCases/auxiliary-files-test/__snapshots__/stats.txt +++ b/tests/rspack-test/statsOutputCases/auxiliary-files-test/__snapshots__/stats.txt @@ -55,4 +55,4 @@ runtime modules xx KiB [no exports] [used exports unknown] -Rspack compiled successfully (97e4ff8d4fa12b75) \ No newline at end of file +Rspack compiled successfully (069708a247d75c94) \ No newline at end of file diff --git a/tests/rspack-test/statsOutputCases/immutable/__snapshots__/stats.txt b/tests/rspack-test/statsOutputCases/immutable/__snapshots__/stats.txt index 6f0fe150129d..8cf1d468f838 100644 --- a/tests/rspack-test/statsOutputCases/immutable/__snapshots__/stats.txt +++ b/tests/rspack-test/statsOutputCases/immutable/__snapshots__/stats.txt @@ -1,2 +1,2 @@ -asset 54175dae41212bb5.js xx KiB [emitted] [immutable] (name: main) +asset eac76fc4ec6c378f.js xx KiB [emitted] [immutable] (name: main) asset 92c4383731fffcb4.js 243 bytes [emitted] [immutable] \ No newline at end of file