Use output.entryFileNames to append ".min.js" instead of ".js" only.
https://rollupjs.org/configuration-options/#output-entryfilenames
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { nodeResolve } from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; export default { input: { main: 'Resources/Private/JavaScript/main.js', }, output: { dir: 'Resources/Public/JavaScript/', entryFileNames: '[name].min.js', format: 'iife', }, plugins: [ nodeResolve(), terser(), ], }; |