forked from 0mkara/etheratom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
35 lines (34 loc) · 942 Bytes
/
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
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import fs from 'fs';
import path from 'path';
import builtins from 'rollup-plugin-node-builtins';
const pkg = JSON.parse(fs.readFileSync(path.resolve('./package.json'), 'utf-8'));
const external = Object.keys(pkg.dependencies || {});
external.push('atom');
external.push('fs');
external.push('child_process');
export default {
input: 'index.js',
output: {
file: 'build/main.js',
format: 'cjs',
sourceMap: false
},
plugins: [
resolve({
mainFields: ['module', 'main'],
extensions: ['.js', '.jsx', '.json'],
preferBuiltins: true
}),
babel({
exclude: 'node_modules/**'
}),
commonjs({
include: ['node_modules/**']
}),
builtins()
],
external
};