-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
48 lines (45 loc) · 1.15 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
import pkg from './package.json' assert { type: 'json' }
const main = './src/index.js'
const utils = './src/utils/index.js'
const parameters = './src/parameters/index.js'
const errors = './src/errors/index.js'
const external = [
'@hbauer/local-file',
'@hbauer/local-file/parameters.js',
...Object.keys(pkg.dependencies),
]
// eslint-disable-next-line import/no-default-export
export default [
{
input: main,
external,
output: [
{ file: pkg.exports['.'].require, format: 'cjs' },
{ file: pkg.exports['.'].import, format: 'esm' },
],
},
{
input: utils,
external,
output: [
{ file: pkg.exports['./utils.js'].require, format: 'cjs' },
{ file: pkg.exports['./utils.js'].import, format: 'esm' },
],
},
{
input: parameters,
external,
output: [
{ file: pkg.exports['./parameters.js'].require, format: 'cjs' },
{ file: pkg.exports['./parameters.js'].import, format: 'esm' },
],
},
{
input: errors,
external,
output: [
{ file: pkg.exports['./errors.js'].require, format: 'cjs' },
{ file: pkg.exports['./errors.js'].import, format: 'esm' },
],
},
]