From 2c71a02ab1d77704cbb489f78b5d5b8062cf6d07 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 3 Jan 2024 14:41:17 +0100 Subject: [PATCH] --- README.rst | 3 +++ rollup.config.js | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 README.rst create mode 100644 rollup.config.js diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..04733b5 --- /dev/null +++ b/README.rst @@ -0,0 +1,3 @@ +Use ``output.entryFileNames`` to append ".min.js" instead of ".js" only. + +https://rollupjs.org/configuration-options/#output-entryfilenames \ No newline at end of file diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..a9f593e --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,17 @@ +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(), + ], +}; -- 2.30.2