Skip to content

Commit

Permalink
refactor: 🎨 remove useless setup
Browse files Browse the repository at this point in the history
  • Loading branch information
stormslowly committed Jan 16, 2024
1 parent 5927f33 commit 49d098a
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions crates/mako/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ mod tests {
use crate::chunk_graph::ChunkGraph;
use crate::compiler::{Context, Meta};
use crate::config::{hash_config, Config};
use crate::module::{Module, ModuleId};
use crate::module::ModuleId;
use crate::module_graph::ModuleGraph;
use crate::resolve::get_resolvers;
use crate::task::Task;
Expand Down Expand Up @@ -767,21 +767,6 @@ const require = window.require;
let mut chunk_graph = ChunkGraph::new();
chunk_graph.add_chunk(Chunk::new("./foo".to_string().into(), ChunkType::Async));

let mut module_graph = ModuleGraph::new();

module_graph.add_module(Module {
id: "test".to_string().into(),
is_entry: false,
info: None,
side_effects: false,
});
module_graph.add_module(Module {
id: "index.jsx".to_string().into(),
is_entry: false,
info: None,
side_effects: false,
});

let resolvers = get_resolvers(&config);
let config_hash = hash_config(&config);

Expand All @@ -790,7 +775,7 @@ const require = window.require;
config_hash,
args: Default::default(),
root: root.clone(),
module_graph: RwLock::new(module_graph),
module_graph: RwLock::new(ModuleGraph::new()),
chunk_graph: RwLock::new(chunk_graph),
assets_info: Mutex::new(HashMap::new()),
modules_with_missing_deps: RwLock::new(Vec::new()),
Expand Down

0 comments on commit 49d098a

Please sign in to comment.