forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
40 lines (38 loc) · 1.03 KB
/
rollup.config.js
File metadata and controls
40 lines (38 loc) · 1.03 KB
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 sourcemaps from 'rollup-plugin-sourcemaps';
import nodeResolve from 'rollup-plugin-node-resolve';
import alias from 'rollup-plugin-alias';
import buble from 'rollup-plugin-buble';
import {join} from 'path';
const outBase = join(__dirname, '..', 'build', 'temp', 'library');
export default {
input: join(outBase, 'ts', 'index.js'),
output: {
file: join(outBase, 'rollup', 'browserfs.rollup.js'),
sourceMap: true,
strict: true,
format: 'cjs',
exports: 'named'
},
external: [
'buffer', 'path'
],
plugins: [
alias({
async: require.resolve('async-es'),
events: require.resolve('../node_modules/events'),
dropbox_bridge: join(outBase, 'ts', 'generic', 'dropbox_bridge_actual.js')
}),
nodeResolve({
mainFields: ['main', 'jsnext:main'],
preferBuiltins: true
}),
sourcemaps(),
buble({
transforms: {
// Assumes all `for of` statements are on arrays or array-like items.
dangerousForOf: true,
generator: false
}
})
]
};