Skip to content

mjs-override

See the source

Overrides the source type to "module" for .mjs files. Use this when your project is primarily CommonJS but has some ES module files.

Sets languageOptions.sourceType to "module" for files matching the pattern.

["**/*.mjs"]
uglify({
with: ["mjs-override"],
options: {
"mjs-override": {
files: ["**/*.mjs"],
},
},
})