-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
40 lines (39 loc) · 1.13 KB
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'rollup';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import terser from '@rollup/plugin-terser';
export default defineConfig({
input: './src/neat-gradient.js', // Entry point
output: [
{
file: 'dist/js/neat-gradient.cjs.js',
format: 'cjs', // CommonJS
},
{
file: 'dist/js/neat-gradient.esm.js',
format: 'esm', // ES Modules
},
{
file: 'dist/js/neat-gradient.umd.js',
format: 'umd', // Universal Module Definition
name: 'NeatAnimatedGradient', // Global name for UMD builds
},
{
file: 'dist/js/neat-gradient.js',
format: 'iife', // IIFE format (browser-specific)
name: 'NeatAnimatedGradient', // Global name for the IIFE
},
{
file: 'dist/js/neat-gradient.min.js',
format: 'iife', // IIFE format (browser-specific)
name: 'NeatAnimatedGradient', // Global name for the IIFE
plugins: [terser()]
}
],
plugins: [
nodeResolve(),
commonjs(),
babel({ babelHelpers: 'bundled' }),
],
});