Files
dioxus/packages/playwright-tests/cli-optimization/assets/esm_module.js
T
Jonathan Kelley 218bb9d56d autodetect js module type - only bundle esm (#5515)
* wip: autodetect esm

* finish fixes

* thread minify through

* add sweetalert2

* Fix default bundle types

* ts-ignore

* small nits

* small more nits

* shrink flamegraph
2026-04-30 17:50:37 -07:00

7 lines
398 B
JavaScript

// No top-level import/export — auto-detection alone would classify this as a
// classic script. `with_module(true)` on the asset overrides that and forces
// the CLI to emit `<script type="module">` and run esbuild with the ESM
// pipeline. The playwright spec asserts both that the global is set and that
// the script tag actually has `type="module"`.
window.__esm_module_value = "ok-module";