diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 27cb3dd6eab..670dbc46baf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,7 +28,6 @@ pnpm-lock.yaml /crates/node_binding /crates/rspack_ast_viewer /crates/rspack_base64 -/crates/rspack_binding_options /crates/rspack_core /crates/rspack_core/src/compiler/make @jerrykingxyz /crates/rspack_error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 753cda6ad7b..0b59b261336 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -319,7 +319,7 @@ jobs: - name: Run test # reason for excluding https://github.com/napi-rs/napi-rs/issues/2200 - run: cargo test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture + run: cargo test --workspace --exclude rspack_node -- --nocapture rust_test_miri: name: Rust test miri @@ -350,7 +350,7 @@ jobs: env: MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-disable-isolation # reason for excluding https://github.com/napi-rs/napi-rs/issues/2200 - run: cargo miri test --workspace --exclude rspack_binding_options --exclude rspack_node -- --nocapture + run: cargo miri test --workspace --exclude rspack_node -- --nocapture run_rust_benchmark: name: Run rust benchmark diff --git a/Cargo.lock b/Cargo.lock index 6197967da4d..2ff53cffb1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3701,17 +3701,18 @@ dependencies = [ ] [[package]] -name = "rspack_binding_options" +name = "rspack_binding_values" version = "0.2.0" dependencies = [ "async-trait", "cow-utils", "derive_more", + "futures", "glob", + "heck 0.5.0", "napi", "napi-derive", "pollster", - "rspack_binding_values", "rspack_cacheable", "rspack_collections", "rspack_core", @@ -3766,6 +3767,7 @@ dependencies = [ "rspack_plugin_web_worker_template", "rspack_plugin_worker", "rspack_regex", + "rspack_util", "rustc-hash 2.1.0", "serde", "serde_json", @@ -3774,28 +3776,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "rspack_binding_values" -version = "0.2.0" -dependencies = [ - "cow-utils", - "futures", - "heck 0.5.0", - "napi", - "napi-derive", - "rspack_collections", - "rspack_core", - "rspack_error", - "rspack_napi", - "rspack_plugin_html", - "rspack_plugin_runtime", - "rspack_regex", - "rspack_util", - "rustc-hash 2.1.0", - "serde", - "serde_json", -] - [[package]] name = "rspack_cacheable" version = "0.2.0" @@ -4160,7 +4140,6 @@ dependencies = [ "napi-derive", "ropey", "rspack_allocator", - "rspack_binding_options", "rspack_binding_values", "rspack_collections", "rspack_core", diff --git a/Cargo.toml b/Cargo.toml index 85747ead490..9d269bbdeef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,7 +110,6 @@ rspack_allocator = { version = "0.2.0", path = "crates/rsp rspack_ast = { version = "0.2.0", path = "crates/rspack_ast" } rspack_base64 = { version = "0.2.0", path = "crates/rspack_base64" } rspack_binding = { version = "0.2.0", path = "crates/rspack_binding" } -rspack_binding_options = { version = "0.2.0", path = "crates/rspack_binding_options" } rspack_binding_values = { version = "0.2.0", path = "crates/rspack_binding_values" } rspack_builtin = { version = "0.2.0", path = "crates/rspack_builtin" } rspack_cacheable = { version = "0.2.0", path = "crates/rspack_cacheable" } diff --git a/crates/node_binding/Cargo.toml b/crates/node_binding/Cargo.toml index b37bc27bacb..90e99cf6e95 100644 --- a/crates/node_binding/Cargo.toml +++ b/crates/node_binding/Cargo.toml @@ -10,13 +10,11 @@ version = "0.2.0" crate-type = ["cdylib"] [features] -default = [] -plugin = ["rspack_binding_options/plugin"] +plugin = ["rspack_binding_values/plugin"] [dependencies] ropey = { workspace = true } rspack_allocator = { workspace = true } -rspack_binding_options = { workspace = true } rspack_binding_values = { workspace = true } rspack_collections = { workspace = true } rspack_core = { workspace = true } diff --git a/crates/node_binding/src/lib.rs b/crates/node_binding/src/lib.rs index 52c562e31ee..fb4a81931df 100644 --- a/crates/node_binding/src/lib.rs +++ b/crates/node_binding/src/lib.rs @@ -10,7 +10,6 @@ use std::sync::{Arc, Mutex}; use compiler::{Compiler, CompilerState, CompilerStateGuard}; use napi::bindgen_prelude::*; -use rspack_binding_options::BuiltinPlugin; use rspack_core::{Compilation, PluginExt}; use rspack_error::Diagnostic; use rspack_fs::IntermediateFileSystem; @@ -25,7 +24,6 @@ mod resolver_factory; pub use diagnostic::*; use plugins::*; use resolver_factory::*; -use rspack_binding_options::*; use rspack_binding_values::*; use rspack_tracing::chrome::FlushGuard; @@ -84,7 +82,7 @@ impl Rspack { compiler_path, compiler_options, plugins, - rspack_binding_options::buildtime_plugins::buildtime_plugins(), + rspack_binding_values::buildtime_plugins::buildtime_plugins(), Some(Arc::new(NodeFileSystem::new(output_filesystem).map_err( |e| Error::from_reason(format!("Failed to create writable filesystem: {e}",)), )?)), diff --git a/crates/rspack_binding_options/Cargo.toml b/crates/rspack_binding_options/Cargo.toml deleted file mode 100644 index b76a919960c..00000000000 --- a/crates/rspack_binding_options/Cargo.toml +++ /dev/null @@ -1,83 +0,0 @@ -[package] -description = "rspack binding options" -edition = "2021" -license = "MIT" -name = "rspack_binding_options" -repository = "https://github.com/web-infra-dev/rspack" -version = "0.2.0" -[features] -default = [] -plugin = ["rspack_loader_swc/plugin"] - -[package.metadata.cargo-shear] -ignored = ["tracing"] - -[dependencies] -async-trait = { workspace = true } -cow-utils = { workspace = true } -derive_more = { workspace = true, features = ["debug"] } -glob = { workspace = true } -napi = { workspace = true, features = ["async", "tokio_rt", "serde-json", "anyhow"] } -napi-derive = { workspace = true } -pollster = { workspace = true } -rspack_binding_values = { workspace = true } -rspack_cacheable = { workspace = true } -rspack_collections = { workspace = true } -rspack_core = { workspace = true } -rspack_error = { workspace = true } -rspack_hook = { workspace = true } -rspack_ids = { workspace = true } -rspack_loader_lightningcss = { workspace = true } -rspack_loader_preact_refresh = { workspace = true } -rspack_loader_react_refresh = { workspace = true } -rspack_loader_runner = { workspace = true } -rspack_loader_swc = { workspace = true } -rspack_loader_testing = { workspace = true } -rspack_napi = { workspace = true } -rspack_napi_macros = { workspace = true } -rspack_paths = { workspace = true } -rspack_plugin_asset = { workspace = true } -rspack_plugin_banner = { workspace = true } -rspack_plugin_context_replacement = { workspace = true } -rspack_plugin_copy = { workspace = true } -rspack_plugin_css = { workspace = true } -rspack_plugin_devtool = { workspace = true } -rspack_plugin_dll = { workspace = true } -rspack_plugin_dynamic_entry = { workspace = true } -rspack_plugin_ensure_chunk_conditions = { workspace = true } -rspack_plugin_entry = { workspace = true } -rspack_plugin_externals = { workspace = true } -rspack_plugin_extract_css = { workspace = true } -rspack_plugin_hmr = { workspace = true } -rspack_plugin_html = { workspace = true } -rspack_plugin_ignore = { workspace = true } -rspack_plugin_javascript = { workspace = true } -rspack_plugin_json = { workspace = true } -rspack_plugin_lazy_compilation = { workspace = true } -rspack_plugin_library = { workspace = true } -rspack_plugin_lightning_css_minimizer = { workspace = true } -rspack_plugin_limit_chunk_count = { workspace = true } -rspack_plugin_merge_duplicate_chunks = { workspace = true } -rspack_plugin_mf = { workspace = true } -rspack_plugin_no_emit_on_errors = { workspace = true } -rspack_plugin_progress = { workspace = true } -rspack_plugin_real_content_hash = { workspace = true } -rspack_plugin_remove_duplicate_modules = { workspace = true } -rspack_plugin_remove_empty_chunks = { workspace = true } -rspack_plugin_runtime = { workspace = true } -rspack_plugin_runtime_chunk = { workspace = true } -rspack_plugin_schemes = { workspace = true } -rspack_plugin_size_limits = { workspace = true } -rspack_plugin_split_chunks = { workspace = true } -rspack_plugin_swc_js_minimizer = { workspace = true } -rspack_plugin_warn_sensitive_module = { workspace = true } -rspack_plugin_wasm = { workspace = true } -rspack_plugin_web_worker_template = { workspace = true } -rspack_plugin_worker = { workspace = true } -rspack_regex = { workspace = true } -rustc-hash = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -swc_core = { workspace = true, default-features = false, features = ["ecma_transforms_react"] } -tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "test-util", "parking_lot"] } -tracing = { workspace = true } diff --git a/crates/rspack_binding_options/LICENSE b/crates/rspack_binding_options/LICENSE deleted file mode 100644 index 46310101ad8..00000000000 --- a/crates/rspack_binding_options/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2022-present Bytedance, Inc. and its affiliates. - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/crates/rspack_binding_options/src/lib.rs b/crates/rspack_binding_options/src/lib.rs deleted file mode 100644 index 3464fe5f86a..00000000000 --- a/crates/rspack_binding_options/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![feature(try_blocks)] -#![feature(let_chains)] -mod options; -mod plugins; -pub use options::*; -pub use plugins::buildtime_plugins; -pub(crate) use plugins::*; diff --git a/crates/rspack_binding_values/Cargo.toml b/crates/rspack_binding_values/Cargo.toml index dfae126a299..5e2e48e2779 100644 --- a/crates/rspack_binding_values/Cargo.toml +++ b/crates/rspack_binding_values/Cargo.toml @@ -5,20 +5,83 @@ license = "MIT" name = "rspack_binding_values" repository = "https://github.com/web-infra-dev/rspack" version = "0.2.0" + +[features] +plugin = ["rspack_loader_swc/plugin"] + +[package.metadata.cargo-shear] +ignored = ["tracing"] + [dependencies] -cow-utils = { workspace = true } -futures = { workspace = true } -heck = { workspace = true } -napi = { workspace = true, features = ["async", "tokio_rt", "serde-json", "anyhow"] } -napi-derive = { workspace = true } -rspack_collections = { workspace = true } -rspack_core = { workspace = true } -rspack_error = { workspace = true } -rspack_napi = { workspace = true } -rspack_plugin_html = { workspace = true } -rspack_plugin_runtime = { workspace = true } -rspack_regex = { workspace = true } -rspack_util = { workspace = true } -rustc-hash = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } +async-trait = { workspace = true } +cow-utils = { workspace = true } +derive_more = { workspace = true, features = ["debug"] } +futures = { workspace = true } +glob = { workspace = true } +heck = { workspace = true } +napi = { workspace = true, features = ["async", "tokio_rt", "serde-json", "anyhow"] } +napi-derive = { workspace = true } +pollster = { workspace = true } +rspack_cacheable = { workspace = true } +rspack_collections = { workspace = true } +rspack_core = { workspace = true } +rspack_error = { workspace = true } +rspack_hook = { workspace = true } +rspack_ids = { workspace = true } +rspack_napi = { workspace = true } +rspack_napi_macros = { workspace = true } +rspack_paths = { workspace = true } +rspack_regex = { workspace = true } +rspack_util = { workspace = true } +rustc-hash = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +swc_core = { workspace = true, default-features = false, features = ["ecma_transforms_react"] } +tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros", "test-util", "parking_lot"] } +tracing = { workspace = true } + + +rspack_loader_lightningcss = { workspace = true } +rspack_loader_preact_refresh = { workspace = true } +rspack_loader_react_refresh = { workspace = true } +rspack_loader_runner = { workspace = true } +rspack_loader_swc = { workspace = true } +rspack_loader_testing = { workspace = true } +rspack_plugin_asset = { workspace = true } +rspack_plugin_banner = { workspace = true } +rspack_plugin_context_replacement = { workspace = true } +rspack_plugin_copy = { workspace = true } +rspack_plugin_css = { workspace = true } +rspack_plugin_devtool = { workspace = true } +rspack_plugin_dll = { workspace = true } +rspack_plugin_dynamic_entry = { workspace = true } +rspack_plugin_ensure_chunk_conditions = { workspace = true } +rspack_plugin_entry = { workspace = true } +rspack_plugin_externals = { workspace = true } +rspack_plugin_extract_css = { workspace = true } +rspack_plugin_hmr = { workspace = true } +rspack_plugin_html = { workspace = true } +rspack_plugin_ignore = { workspace = true } +rspack_plugin_javascript = { workspace = true } +rspack_plugin_json = { workspace = true } +rspack_plugin_lazy_compilation = { workspace = true } +rspack_plugin_library = { workspace = true } +rspack_plugin_lightning_css_minimizer = { workspace = true } +rspack_plugin_limit_chunk_count = { workspace = true } +rspack_plugin_merge_duplicate_chunks = { workspace = true } +rspack_plugin_mf = { workspace = true } +rspack_plugin_no_emit_on_errors = { workspace = true } +rspack_plugin_progress = { workspace = true } +rspack_plugin_real_content_hash = { workspace = true } +rspack_plugin_remove_duplicate_modules = { workspace = true } +rspack_plugin_remove_empty_chunks = { workspace = true } +rspack_plugin_runtime = { workspace = true } +rspack_plugin_runtime_chunk = { workspace = true } +rspack_plugin_schemes = { workspace = true } +rspack_plugin_size_limits = { workspace = true } +rspack_plugin_split_chunks = { workspace = true } +rspack_plugin_swc_js_minimizer = { workspace = true } +rspack_plugin_warn_sensitive_module = { workspace = true } +rspack_plugin_wasm = { workspace = true } +rspack_plugin_web_worker_template = { workspace = true } +rspack_plugin_worker = { workspace = true } diff --git a/crates/rspack_binding_values/src/lib.rs b/crates/rspack_binding_values/src/lib.rs index 53f3de249f4..1627411a8e4 100644 --- a/crates/rspack_binding_values/src/lib.rs +++ b/crates/rspack_binding_values/src/lib.rs @@ -1,4 +1,6 @@ +#![feature(let_chains)] #![feature(try_blocks)] + mod asset; mod asset_condition; mod chunk; @@ -19,6 +21,8 @@ mod module_graph; mod normal_module_factory; mod options; mod path_data; +mod plugins; +mod raw_options; mod resolver; mod resource_data; mod rspack_error; @@ -46,6 +50,9 @@ pub use module_graph::*; pub use normal_module_factory::*; pub use options::*; pub use path_data::*; +pub use plugins::buildtime_plugins; +pub(crate) use plugins::*; +pub use raw_options::*; pub use resolver::*; pub use resource_data::*; pub use rspack_error::*; diff --git a/crates/rspack_binding_options/src/plugins/buildtime_plugins.rs b/crates/rspack_binding_values/src/plugins/buildtime_plugins.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/buildtime_plugins.rs rename to crates/rspack_binding_values/src/plugins/buildtime_plugins.rs diff --git a/crates/rspack_binding_options/src/plugins/context_replacement.rs b/crates/rspack_binding_values/src/plugins/context_replacement.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/context_replacement.rs rename to crates/rspack_binding_values/src/plugins/context_replacement.rs diff --git a/crates/rspack_binding_options/src/plugins/js_loader/context.rs b/crates/rspack_binding_values/src/plugins/js_loader/context.rs similarity index 98% rename from crates/rspack_binding_options/src/plugins/js_loader/context.rs rename to crates/rspack_binding_values/src/plugins/js_loader/context.rs index 83da01720f6..44c629fcadb 100644 --- a/crates/rspack_binding_options/src/plugins/js_loader/context.rs +++ b/crates/rspack_binding_values/src/plugins/js_loader/context.rs @@ -2,12 +2,13 @@ use std::collections::HashMap; use napi::bindgen_prelude::*; use napi_derive::napi; -use rspack_binding_values::{JsModuleWrapper, JsResourceData, JsRspackError}; use rspack_core::{LoaderContext, RunnerContext}; use rspack_error::error; use rspack_loader_runner::{LoaderItem, State as LoaderState}; use rspack_napi::threadsafe_js_value_ref::ThreadsafeJsValueRef; +use crate::{JsModuleWrapper, JsResourceData, JsRspackError}; + #[napi(object)] pub struct JsLoaderItem { pub request: String, diff --git a/crates/rspack_binding_options/src/plugins/js_loader/mod.rs b/crates/rspack_binding_values/src/plugins/js_loader/mod.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/js_loader/mod.rs rename to crates/rspack_binding_values/src/plugins/js_loader/mod.rs diff --git a/crates/rspack_binding_options/src/plugins/js_loader/resolver.rs b/crates/rspack_binding_values/src/plugins/js_loader/resolver.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/js_loader/resolver.rs rename to crates/rspack_binding_values/src/plugins/js_loader/resolver.rs diff --git a/crates/rspack_binding_options/src/plugins/js_loader/scheduler.rs b/crates/rspack_binding_values/src/plugins/js_loader/scheduler.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/js_loader/scheduler.rs rename to crates/rspack_binding_values/src/plugins/js_loader/scheduler.rs diff --git a/crates/rspack_binding_options/src/plugins/mod.rs b/crates/rspack_binding_values/src/plugins/mod.rs similarity index 100% rename from crates/rspack_binding_options/src/plugins/mod.rs rename to crates/rspack_binding_values/src/plugins/mod.rs diff --git a/crates/rspack_binding_options/src/options/mod.rs b/crates/rspack_binding_values/src/raw_options/mod.rs similarity index 98% rename from crates/rspack_binding_options/src/options/mod.rs rename to crates/rspack_binding_values/src/raw_options/mod.rs index e2fb75b51e4..4991e966866 100644 --- a/crates/rspack_binding_options/src/options/mod.rs +++ b/crates/rspack_binding_values/src/raw_options/mod.rs @@ -33,7 +33,8 @@ pub use raw_output::*; pub use raw_snapshot::*; pub use raw_split_chunks::*; pub use raw_stats::*; -pub use rspack_binding_values::raw_resolve::*; + +pub use crate::raw_resolve::*; #[derive(Debug)] #[napi(object, object_to_js = false)] diff --git a/crates/rspack_binding_options/src/options/raw_builtins/mod.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/mod.rs similarity index 99% rename from crates/rspack_binding_options/src/options/raw_builtins/mod.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/mod.rs index fc8c6a4a9ca..f9cac94c2ba 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/mod.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/mod.rs @@ -20,7 +20,6 @@ use napi_derive::napi; use raw_dll::{RawDllReferenceAgencyPluginOptions, RawFlagAllModulesAsUsedPluginOptions}; use raw_ids::RawOccurrenceChunkIdsPluginOptions; use raw_lightning_css_minimizer::RawLightningCssMinimizerRspackPluginOptions; -use rspack_binding_values::entry::JsEntryPluginOptions; use rspack_core::{BoxPlugin, Plugin, PluginExt}; use rspack_error::Result; use rspack_ids::{ @@ -103,6 +102,7 @@ use self::{ raw_runtime_chunk::RawRuntimeChunkOptions, raw_size_limits::RawSizeLimitsPluginOptions, }; +use crate::entry::JsEntryPluginOptions; use crate::{ plugins::JsLoaderRspackPlugin, JsLoaderRunner, RawContextReplacementPluginOptions, RawDynamicEntryPluginOptions, RawEvalDevToolModulePluginOptions, RawExternalItemWrapper, diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_banner.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_banner.rs similarity index 96% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_banner.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_banner.rs index 3762fbb795d..43c216e0be2 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_banner.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_banner.rs @@ -1,12 +1,13 @@ use derive_more::Debug; use napi::Either; use napi_derive::napi; -use rspack_binding_values::{into_asset_conditions, JsChunkWrapper, RawAssetConditions}; use rspack_collections::DatabaseItem; use rspack_error::Result; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_banner::{BannerContent, BannerContentFnCtx, BannerPluginOptions}; +use crate::{into_asset_conditions, JsChunkWrapper, RawAssetConditions}; + #[napi(object, object_from_js = false)] pub struct JsBannerContentFnCtx { pub hash: String, diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_bundle_info.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_bundle_info.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_bundle_info.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_bundle_info.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_copy.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_copy.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_copy.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_copy.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_css_extract.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_css_extract.rs similarity index 96% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_css_extract.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_css_extract.rs index 2a18caa3315..09fb31713af 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_css_extract.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_css_extract.rs @@ -1,9 +1,10 @@ use std::collections::HashMap; use napi_derive::napi; -use rspack_binding_values::JsFilename; use rspack_plugin_extract_css::plugin::{CssExtractOptions, InsertType}; +use crate::JsFilename; + #[napi(object, object_to_js = false)] pub struct RawCssExtractPluginOption { pub filename: JsFilename, diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_dll.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_dll.rs similarity index 98% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_dll.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_dll.rs index 89f886bfe16..201ea191123 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_dll.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_dll.rs @@ -1,6 +1,5 @@ use napi::Either; use napi_derive::napi; -use rspack_binding_values::{JsBuildMeta, JsFilename}; use rspack_plugin_dll::{ DllEntryPluginOptions, DllManifest, DllManifestContent, DllManifestContentItem, DllManifestContentItemExports, DllReferenceAgencyPluginOptions, LibManifestPluginOptions, @@ -8,6 +7,8 @@ use rspack_plugin_dll::{ use rustc_hash::FxHashMap as HashMap; use swc_core::atoms::Atom; +use crate::{JsBuildMeta, JsFilename}; + #[derive(Debug)] #[napi(object)] pub struct RawDllEntryPluginOptions { diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_html.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_html.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_html.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_html.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_ids.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_ids.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_ids.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_ids.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_ignore.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_ignore.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_ignore.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_ignore.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_lazy_compilation.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lazy_compilation.rs similarity index 98% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_lazy_compilation.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lazy_compilation.rs index 7b7dcf0d05a..a42cbdd2243 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_lazy_compilation.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lazy_compilation.rs @@ -3,7 +3,6 @@ use napi::{ Either, }; use napi_derive::napi; -use rspack_binding_values::JsModuleWrapper; use rspack_core::{CompilationId, ModuleIdentifier}; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_lazy_compilation::{ @@ -12,6 +11,8 @@ use rspack_plugin_lazy_compilation::{ }; use rspack_regex::RspackRegex; +use crate::JsModuleWrapper; + #[derive(Debug)] pub struct RawLazyCompilationTest>>( pub Either, diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_lightning_css_minimizer.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lightning_css_minimizer.rs similarity index 98% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_lightning_css_minimizer.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lightning_css_minimizer.rs index 3f1a367f5ee..2d2f5f1c17c 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_lightning_css_minimizer.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_lightning_css_minimizer.rs @@ -1,10 +1,11 @@ use napi_derive::napi; -use rspack_binding_values::{into_asset_conditions, RawAssetConditions}; use rspack_error::Result; use rspack_plugin_lightning_css_minimizer::{ Draft, MinimizerOptions, NonStandard, PluginOptions, PseudoClasses, }; +use crate::{into_asset_conditions, RawAssetConditions}; + #[derive(Debug)] #[napi(object)] pub struct RawLightningCssMinimizerRspackPluginOptions { diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_limit_chunk_count.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_limit_chunk_count.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_limit_chunk_count.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_limit_chunk_count.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_mf.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_mf.rs similarity index 99% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_mf.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_mf.rs index f4e78225756..3bf5e77a8de 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_mf.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_mf.rs @@ -2,15 +2,16 @@ use std::sync::Arc; use napi::Either; use napi_derive::napi; -use rspack_binding_values::{ - entry::{JsEntryRuntime, JsEntryRuntimeWrapper}, - library::JsLibraryOptions, -}; use rspack_plugin_mf::{ ConsumeOptions, ConsumeSharedPluginOptions, ConsumeVersion, ContainerPluginOptions, ContainerReferencePluginOptions, ExposeOptions, ProvideOptions, ProvideVersion, RemoteOptions, }; +use crate::{ + entry::{JsEntryRuntime, JsEntryRuntimeWrapper}, + library::JsLibraryOptions, +}; + #[derive(Debug)] #[napi(object)] pub struct RawContainerPluginOptions { diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_progress.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_progress.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_progress.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_progress.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_runtime_chunk.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_runtime_chunk.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_runtime_chunk.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_runtime_chunk.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_size_limits.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_size_limits.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_size_limits.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_size_limits.rs diff --git a/crates/rspack_binding_options/src/options/raw_builtins/raw_swc_js_minimizer.rs b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_swc_js_minimizer.rs similarity index 97% rename from crates/rspack_binding_options/src/options/raw_builtins/raw_swc_js_minimizer.rs rename to crates/rspack_binding_values/src/raw_options/raw_builtins/raw_swc_js_minimizer.rs index 87a8ed52916..9408a2f03da 100644 --- a/crates/rspack_binding_options/src/options/raw_builtins/raw_swc_js_minimizer.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_builtins/raw_swc_js_minimizer.rs @@ -1,6 +1,5 @@ use napi::Either; use napi_derive::napi; -use rspack_binding_values::{into_asset_conditions, RawAssetConditions}; use rspack_error::{miette::IntoDiagnostic, Result}; use rspack_plugin_swc_js_minimizer::{ ExtractComments, MinimizerOptions, OptionWrapper, PluginOptions, @@ -8,6 +7,8 @@ use rspack_plugin_swc_js_minimizer::{ use serde::de::DeserializeOwned; use swc_core::base::BoolOrDataConfig; +use crate::{into_asset_conditions, RawAssetConditions}; + #[derive(Debug)] #[napi(object)] pub struct RawExtractComments { diff --git a/crates/rspack_binding_options/src/options/raw_cache.rs b/crates/rspack_binding_values/src/raw_options/raw_cache.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_cache.rs rename to crates/rspack_binding_values/src/raw_options/raw_cache.rs diff --git a/crates/rspack_binding_options/src/options/raw_devtool.rs b/crates/rspack_binding_values/src/raw_options/raw_devtool.rs similarity index 98% rename from crates/rspack_binding_options/src/options/raw_devtool.rs rename to crates/rspack_binding_values/src/raw_options/raw_devtool.rs index d95c0cdb8d4..c54ee21bc7f 100644 --- a/crates/rspack_binding_options/src/options/raw_devtool.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_devtool.rs @@ -3,7 +3,6 @@ use std::sync::Arc; use napi::bindgen_prelude::{Either3, Null}; use napi::Either; use napi_derive::napi; -use rspack_binding_values::{into_asset_conditions, RawAssetConditions}; use rspack_core::PathData; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_devtool::{ @@ -11,6 +10,8 @@ use rspack_plugin_devtool::{ SourceMapDevToolPluginOptions, }; +use crate::{into_asset_conditions, RawAssetConditions}; + type RawAppend = Either3>; #[derive(Debug, Clone)] diff --git a/crates/rspack_binding_options/src/options/raw_dynamic_entry.rs b/crates/rspack_binding_values/src/raw_options/raw_dynamic_entry.rs similarity index 96% rename from crates/rspack_binding_options/src/options/raw_dynamic_entry.rs rename to crates/rspack_binding_values/src/raw_options/raw_dynamic_entry.rs index 7da0f93750f..59c330298bd 100644 --- a/crates/rspack_binding_options/src/options/raw_dynamic_entry.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_dynamic_entry.rs @@ -1,8 +1,9 @@ use napi_derive::napi; -use rspack_binding_values::entry::JsEntryOptions; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_dynamic_entry::{DynamicEntryPluginOptions, EntryDynamicResult}; +use crate::entry::JsEntryOptions; + #[derive(Debug)] #[napi(object, object_to_js = false)] pub struct RawEntryDynamicResult { diff --git a/crates/rspack_binding_options/src/options/raw_experiments/mod.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/mod.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/mod.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/mod.rs diff --git a/crates/rspack_binding_options/src/options/raw_experiments/raw_cache/mod.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/mod.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/raw_cache/mod.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/mod.rs diff --git a/crates/rspack_binding_options/src/options/raw_experiments/raw_cache/raw_snapshot.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/raw_snapshot.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/raw_cache/raw_snapshot.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/raw_snapshot.rs diff --git a/crates/rspack_binding_options/src/options/raw_experiments/raw_cache/raw_storage.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/raw_storage.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/raw_cache/raw_storage.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/raw_cache/raw_storage.rs diff --git a/crates/rspack_binding_options/src/options/raw_experiments/raw_incremental.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/raw_incremental.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/raw_incremental.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/raw_incremental.rs diff --git a/crates/rspack_binding_options/src/options/raw_experiments/raw_rspack_future.rs b/crates/rspack_binding_values/src/raw_options/raw_experiments/raw_rspack_future.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_experiments/raw_rspack_future.rs rename to crates/rspack_binding_values/src/raw_options/raw_experiments/raw_rspack_future.rs diff --git a/crates/rspack_binding_options/src/options/raw_external.rs b/crates/rspack_binding_values/src/raw_options/raw_external.rs similarity index 99% rename from crates/rspack_binding_options/src/options/raw_external.rs rename to crates/rspack_binding_values/src/raw_options/raw_external.rs index 87a204229d5..bb35d530c0c 100644 --- a/crates/rspack_binding_options/src/options/raw_external.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_external.rs @@ -4,12 +4,13 @@ use std::sync::Arc; use napi::bindgen_prelude::Either4; use napi_derive::napi; -use rspack_binding_values::JsResolver; use rspack_core::{ExternalItem, ExternalItemFnResult, ExternalItemValue}; use rspack_core::{ExternalItemFnCtx, ResolveOptionsWithDependencyType, ResolverFactory}; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_regex::RspackRegex; +use crate::JsResolver; + #[napi(object)] pub struct RawHttpExternalsRspackPluginOptions { pub css: bool, diff --git a/crates/rspack_binding_options/src/options/raw_mode.rs b/crates/rspack_binding_values/src/raw_options/raw_mode.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_mode.rs rename to crates/rspack_binding_values/src/raw_options/raw_mode.rs diff --git a/crates/rspack_binding_options/src/options/raw_module/mod.rs b/crates/rspack_binding_values/src/raw_options/raw_module/mod.rs similarity index 99% rename from crates/rspack_binding_options/src/options/raw_module/mod.rs rename to crates/rspack_binding_values/src/raw_options/raw_module/mod.rs index 6044dbe6421..da924f94b08 100644 --- a/crates/rspack_binding_options/src/options/raw_module/mod.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_module/mod.rs @@ -5,7 +5,6 @@ use derive_more::Debug; use napi::bindgen_prelude::{Buffer, Either3}; use napi::Either; use napi_derive::napi; -use rspack_binding_values::{JsFilename, JsModuleWrapper}; use rspack_core::{ AssetGeneratorDataUrl, AssetGeneratorDataUrlFnCtx, AssetGeneratorDataUrlOptions, AssetGeneratorOptions, AssetInlineGeneratorOptions, AssetParserDataUrl, @@ -23,6 +22,7 @@ use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_regex::RspackRegex; use crate::RawResolveOptions; +use crate::{JsFilename, JsModuleWrapper}; /// `loader` is for both JS and Rust loaders. /// `options` is diff --git a/crates/rspack_binding_options/src/options/raw_node.rs b/crates/rspack_binding_values/src/raw_options/raw_node.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_node.rs rename to crates/rspack_binding_values/src/raw_options/raw_node.rs diff --git a/crates/rspack_binding_options/src/options/raw_optimization.rs b/crates/rspack_binding_values/src/raw_options/raw_optimization.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_optimization.rs rename to crates/rspack_binding_values/src/raw_options/raw_optimization.rs diff --git a/crates/rspack_binding_options/src/options/raw_output.rs b/crates/rspack_binding_values/src/raw_options/raw_output.rs similarity index 98% rename from crates/rspack_binding_options/src/options/raw_output.rs rename to crates/rspack_binding_values/src/raw_options/raw_output.rs index 5f4ba459363..53466fb4dd3 100644 --- a/crates/rspack_binding_options/src/options/raw_output.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_output.rs @@ -1,12 +1,13 @@ use napi::Either; use napi_derive::napi; -use rspack_binding_values::library::JsLibraryOptions; -use rspack_binding_values::{JsCleanOptions, JsFilename}; use rspack_core::{ CleanOptions, CrossOriginLoading, Environment, OnPolicyCreationFailure, PathInfo, }; use rspack_core::{OutputOptions, TrustedTypes}; +use crate::library::JsLibraryOptions; +use crate::{JsCleanOptions, JsFilename}; + #[derive(Debug)] #[napi(object)] pub struct RawTrustedTypes { diff --git a/crates/rspack_binding_options/src/options/raw_snapshot.rs b/crates/rspack_binding_values/src/raw_options/raw_snapshot.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_snapshot.rs rename to crates/rspack_binding_values/src/raw_options/raw_snapshot.rs diff --git a/crates/rspack_binding_options/src/options/raw_split_chunks/mod.rs b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/mod.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_split_chunks/mod.rs rename to crates/rspack_binding_values/src/raw_options/raw_split_chunks/mod.rs diff --git a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_cache_group_test.rs b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_cache_group_test.rs similarity index 96% rename from crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_cache_group_test.rs rename to crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_cache_group_test.rs index 792a27b5ad2..51a6fca32b4 100644 --- a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_cache_group_test.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_cache_group_test.rs @@ -2,11 +2,12 @@ use std::sync::Arc; use napi::bindgen_prelude::Either3; use napi_derive::napi; -use rspack_binding_values::JsModuleWrapper; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_split_chunks::{CacheGroupTest, CacheGroupTestFnCtx}; use rspack_regex::RspackRegex; +use crate::JsModuleWrapper; + pub(super) type RawCacheGroupTest = Either3>>; diff --git a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_chunks.rs b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_chunks.rs similarity index 95% rename from crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_chunks.rs rename to crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_chunks.rs index 5b5285b9f10..23f435bd066 100644 --- a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_chunks.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_chunks.rs @@ -1,12 +1,13 @@ use std::sync::Arc; use napi::{bindgen_prelude::Either3, JsString}; -use rspack_binding_values::JsChunkWrapper; use rspack_collections::DatabaseItem; use rspack_napi::string::JsStringExt; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_regex::RspackRegex; +use crate::JsChunkWrapper; + pub type Chunks = Either3>; pub fn create_chunks_filter(raw: Chunks) -> rspack_plugin_split_chunks::ChunkFilter { diff --git a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_name.rs b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs similarity index 96% rename from crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_name.rs rename to crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs index 3a4948f9551..de4001ad01f 100644 --- a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_name.rs +++ b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_name.rs @@ -2,11 +2,12 @@ use std::sync::Arc; use napi::bindgen_prelude::Either3; use napi_derive::napi; -use rspack_binding_values::{JsChunkWrapper, JsModuleWrapper}; use rspack_collections::DatabaseItem; use rspack_napi::threadsafe_function::ThreadsafeFunction; use rspack_plugin_split_chunks::{ChunkNameGetter, ChunkNameGetterFnCtx}; +use crate::{JsChunkWrapper, JsModuleWrapper}; + pub(super) type RawChunkOptionName = Either3>>; diff --git a/crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_size.rs b/crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_size.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_split_chunks/raw_split_chunk_size.rs rename to crates/rspack_binding_values/src/raw_options/raw_split_chunks/raw_split_chunk_size.rs diff --git a/crates/rspack_binding_options/src/options/raw_stats.rs b/crates/rspack_binding_values/src/raw_options/raw_stats.rs similarity index 100% rename from crates/rspack_binding_options/src/options/raw_stats.rs rename to crates/rspack_binding_values/src/raw_options/raw_stats.rs diff --git a/crates/rspack_tracing/src/lib.rs b/crates/rspack_tracing/src/lib.rs index bbe799e4164..6f0017529d1 100644 --- a/crates/rspack_tracing/src/lib.rs +++ b/crates/rspack_tracing/src/lib.rs @@ -67,7 +67,7 @@ fn generate_common_layers( ("rspack_node", default_level), ("rspack_plugin_javascript", default_level), ("rspack_plugin_split_chunks", default_level), - ("rspack_binding_options", default_level), + ("rspack_binding_values", default_level), ]) .boxed(), ); diff --git a/tests/webpack-test/cases/loaders/cjs-loader-type/index.js b/tests/webpack-test/cases/loaders/cjs-loader-type/index.js index 876b8ca7369..0b232811d80 100644 --- a/tests/webpack-test/cases/loaders/cjs-loader-type/index.js +++ b/tests/webpack-test/cases/loaders/cjs-loader-type/index.js @@ -10,6 +10,6 @@ it("should pass 'commonjs' type to loader for .cjs", function () { // ORIGINAL WEBPACK COMMENT: TODO otherwise this test case cause segment fault // Turned on this as rspack checks extensions for loader type. // So this will not fall into dynamic import which causes segment fault. - // See: crates/rspack_binding_options/src/plugins/js_loader/resolver.rs + // See: crates/rspack_binding_values/src/plugins/js_loader/resolver.rs expect(require("esm/loader.cjs!")).toBe("commonjs"); });