Skip to content

Commit

Permalink
fix(win): module id should be win_pathed
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Sep 13, 2024
1 parent 421560f commit a9944b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/mako/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use swc_core::ecma::ast::{
use swc_core::ecma::utils::quote_ident;

use crate::ast::css_ast::CssAst;
use crate::ast::file::File;
use crate::ast::file::{win_path, File};
use crate::ast::js_ast::JsAst;
use crate::build::analyze_deps::AnalyzeDepsResult;
use crate::compiler::Context;
Expand Down Expand Up @@ -214,7 +214,7 @@ pub fn generate_module_id(origin_module_id: String, context: &Arc<Context>) -> S
// readable ids for debugging usage
let absolute_path = PathBuf::from(origin_module_id);
let relative_path = diff_paths(&absolute_path, &context.root).unwrap_or(absolute_path);
relative_path.to_string_lossy().to_string()
win_path(relative_path.to_str().unwrap())
}
}
}
Expand Down

0 comments on commit a9944b8

Please sign in to comment.