diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/rollup.config.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.config/rollup.config.js b/.config/rollup.config.js index c056776..04c8ff5 100644 --- a/.config/rollup.config.js +++ b/.config/rollup.config.js @@ -70,13 +70,14 @@ const classes = [ 'Use' ] -const config = (node, min) => ({ - input: node ? './src/main.js' : './src/svg.js', +const config = (node, min, esm = false) => ({ + input: (node || esm) ? './src/main.js' : './src/svg.js', output: { - file: node ? './dist/svg.node.js' + file: esm ? './dist/svg.esm.js' + : node ? './dist/svg.node.js' : min ? './dist/svg.min.js' - : './dist/svg.js', - format: node ? 'cjs' : 'iife', + : './dist/svg.js', + format: esm ? 'esm' : node ? 'cjs' : 'iife', name: 'SVG', sourcemap: true, banner: headerLong, @@ -104,6 +105,6 @@ const config = (node, min) => ({ }) // [node, minified] -const modes = [[false], [false, true], [true]] +const modes = [[false], [false, true], [true], [false, false, true]] export default modes.map(m => config(...m)) |