Skip to content

Commit

Permalink
fix: 🐛 hash when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
stormslowly committed Dec 17, 2024
1 parent 132eacf commit 1d791a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/mako/src/generate/chunk_pot/ast_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,12 @@ fn render_entry_chunk_js_without_full_hash(

let (buf, source_map_buf) = util::render_module_js(&ast.ast, context)?;

let hash = Some(file_content_hash(&buf));
let hash = if context.config.hash || context.config.output.filename.is_some() {
crate::mako_profile_scope!("entryHash");
Some(file_content_hash(&buf))
} else {
None
};

Ok(RenderedChunk {
content: buf,
Expand Down

0 comments on commit 1d791a7

Please sign in to comment.