Skip to content

Commit

Permalink
chore: log
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Mar 15, 2024
1 parent 26ef4db commit 4c99325
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,22 @@ impl HarmonyExportImportedSpecifierDependency {
let mut fragments = vec![];
let mg = &compilation.module_graph;
// FIXME:
// let connection = mg.connection_by_dependency(&self.id);
println!(
"self.id {:?} {:?}",
&self.id,
mg.get_module(&self.id),
// connection.unwrap().module_identifier
);
// let data = mg
// .get_module(&self.id)
// .unwrap()
// .as_normal_module()
// .and_then(|m| Some(m.resource_resolved_data()));
// if let Some(data) = data {
// let resource_path = &data.resource_path;
// println!("resource_path {:?}", resource_path)
// }
let imported_module = mg
.module_identifier_by_dependency_id(&self.id)
.expect("should have imported module identifier");
.unwrap_or_else(|| {
println!("resource_path {:?} {:?}", module.identifier(), &self);
panic!();
});
// .expect("should have imported module identifier");
let module_identifier = module.identifier();
let import_var = get_import_var(mg, self.id);
match mode.ty {
Expand Down
14 changes: 7 additions & 7 deletions packages/create-rspack/template-react-ts/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ module.exports = {
}
]
},
// optimization: {
// sideEffects: true,
// usedExports: true,
// providedExports: true,
// mangleExports: true,
// moduleIds: 'named'
// },
optimization: {
sideEffects: "flag",
usedExports: true,
providedExports: true,
mangleExports: true,
moduleIds: "named"
},
experiments: {
rspackFuture: {
newTreeshaking: true
Expand Down

0 comments on commit 4c99325

Please sign in to comment.