-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
52 lines (51 loc) · 1.25 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import alias from '@rollup/plugin-alias';
import resolve from '@rollup/plugin-node-resolve';
export default [
{
input: [
'browser.js',
'index.js'
],
output: {
dir: 'dist/cjs',
format: 'cjs',
sourcemap: false,
strict: false,
preserveModules: true,
exports: 'named',
entryFileNames: '[name].[format]',
esModule: false
},
plugins: [
alias({
entries:{
'#node:os': 'node:os',
'#node:process': 'node:process',
'#node:stream': 'node:stream',
'#node:buffer': 'node:buffer'
}
}),
resolve()
]
},
{
input: [
'qjs.js'
],
output: {
dir: 'dist/qjs',
format: 'esm',
sourcemap: false,
strict: false,
preserveModules: true,
exports: 'auto',
entryFileNames: '[name].js',
esModule: false
},
plugins: [
resolve({
exportConditions: ['qjs', 'default', 'import']
})
]
}
];