mjs-override
Overrides the source type to "module" for .mjs files. Use this when your project is primarily CommonJS but has some ES module files.
What it does
Section titled “What it does”Sets languageOptions.sourceType to "module" for files matching the pattern.
Default file patterns
Section titled “Default file patterns”["**/*.mjs"]Options
Section titled “Options”uglify({ with: ["mjs-override"], options: { "mjs-override": { files: ["**/*.mjs"], }, },})