next.js
036b9576 - Turbopack: Don't convert script to module when using preset-env (#80724)

Commit
189 days ago
Turbopack: Don't convert script to module when using preset-env (#80724) Both swc's `preset_env` and the `crates/next-core/src/next_shared/transforms/next_track_dynamic_imports.rs` were using the `Program::{Module, Script}` type to determine whether to insert CJS requires or ESM imports. Remove the normaliziation of modules to scripts to allow these transforms to insert the right type of import.
Author
Parents
Loading