rspack_plugin_devtool/
lib.rs1mod eval_dev_tool_module_plugin;
2mod eval_source_map_dev_tool_plugin;
3mod generate_debug_id;
4mod mapped_assets_cache;
5mod module_filename_helpers;
6mod source_map_dev_tool_module_options_plugin;
7mod source_map_dev_tool_plugin;
8
9use std::sync::Arc;
10
11pub use eval_dev_tool_module_plugin::*;
12pub use eval_source_map_dev_tool_plugin::*;
13use futures::future::BoxFuture;
14use rspack_core::ModuleIdentifier;
15use rspack_error::Result;
16pub use source_map_dev_tool_module_options_plugin::*;
17pub use source_map_dev_tool_plugin::*;
18
19pub type ModuleFilenameTemplateFn =
20 Arc<dyn Fn(ModuleFilenameTemplateFnCtx) -> BoxFuture<'static, Result<String>> + Sync + Send>;
21
22pub struct ModuleFilenameTemplateFnCtx {
23 pub identifier: String,
24 pub short_identifier: String,
25 pub resource: String,
26 pub resource_path: String,
27 pub absolute_resource_path: String,
28 pub loaders: String,
29 pub all_loaders: String,
30 pub query: String,
31 pub module_id: String,
32 pub hash: String,
33 pub namespace: String,
34}
35
36#[derive(Debug, PartialEq, Eq, Hash)]
37enum ModuleOrSource {
38 Source(String),
39 Module(ModuleIdentifier),
40}