forked from zaach/jison
-
Notifications
You must be signed in to change notification settings - Fork 20
/
rollup.config-template.js
64 lines (59 loc) · 1.55 KB
/
rollup.config-template.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// rollup.config.js
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
//input: 'dummy.js',
//treeshake: false,
//output: [
// {
// file: 'dist/dummy-cjs.js',
// format: 'cjs'
// },
// {
// file: 'dist/dummy-es6.js',
// format: 'es'
// },
// {
// file: 'dist/dummy-umd.js',
// name: 'jison-cli',
// format: 'umd'
// }
//],
plugins: [
resolve({
// use "module" field for ES6 module if possible
//
// use "main" field or index.js, even if it's not an ES6 module
// (needs to be converted from CommonJS to ES6
// – see https://github.com/rollup/rollup-plugin-commonjs
mainFields: ['module', 'main'],
// not all files you want to resolve are .js files
extensions: [ '.js' ], // Default: ['.js']
// whether to prefer built-in modules (e.g. `fs`, `path`) or
// local ones with the same names
preferBuiltins: true, // Default: true
// If true, inspect resolved files to check that they are
// ES2015 modules
modulesOnly: true, // Default: false
})
],
external: [
'ast-util',
'@gerhobbelt/json5',
'@gerhobbelt/nomnom',
'@gerhobbelt/prettier-miscellaneous',
'recast',
'@gerhobbelt/xregexp',
'jison-helpers-lib',
'@gerhobbelt/lex-parser',
'@gerhobbelt/jison-lex',
'@gerhobbelt/ebnf-parser',
'@gerhobbelt/jison2json',
'@gerhobbelt/json2jison',
'jison-gho',
'assert',
'fs',
'path',
'process',
]
};