RollupJs: .min.js file extension for output.dir

raw

README.rst

Use output.entryFileNames to append ".min.js" instead of ".js" only.

https://rollupjs.org/configuration-options/#output-entryfilenames

raw

rollup.config.js

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(),
  ],
};
 
Christian Weiske Christian Weiske
owner

History