-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrollup.config.js
More file actions
35 lines (34 loc) · 744 Bytes
/
Copy pathrollup.config.js
File metadata and controls
35 lines (34 loc) · 744 Bytes
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
import { defineConfig } from 'rollup';
import dts from 'rollup-plugin-dts';
import terser from '@rollup/plugin-terser';
export default defineConfig([
// ESM Build (main)
{
input: 'src/objectEquals.mjs',
output: {
file: 'dist/object-equals.esm.js',
format: 'esm',
sourcemap: true,
},
plugins: [terser()],
},
// Node-specific ESM Build
{
input: 'src/objectEquals.node.mjs',
output: {
file: 'dist/object-equals.node.esm.js',
format: 'esm',
sourcemap: false,
},
plugins: [terser()],
},
// TypeScript declarations
{
input: 'src/objectEquals.d.mts',
output: {
file: 'dist/object-equals.d.ts',
format: 'esm',
},
plugins: [dts()],
},
]);