-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
40 lines (39 loc) · 944 Bytes
/
rollup.config.js
File metadata and controls
40 lines (39 loc) · 944 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
36
37
38
39
40
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import esbuild from 'rollup-plugin-esbuild';
import json from '@rollup/plugin-json';
export default {
input: './src/index.js',
output: {
dir: 'dist',
format: 'esm',
sourcemap: true,
banner: '#!/usr/bin/env node', // Ensure CLI compatibility
},
plugins: [
resolve({
preferBuiltins: false,
}),
commonjs(),
json(),
esbuild({
target: 'esnext', // Set the target to 'esnext'
sourceMap: true, // Enable sourcemaps
minify: true, // Enable minification --minification increases the build time sometimes
}),
],
external: [
'fs',
'path',
'os',
'chalk',
'ora',
'@inquirer/prompts',
'crypto',
'figlet',
'chalk-animation',
'commander',
'cli-html',
'inquirer-file-selector',
], // Mark built-in and installed modules as external
};