forked from mollie/mollie-api-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
30 lines (29 loc) · 926 Bytes
/
rollup.config.js
File metadata and controls
30 lines (29 loc) · 926 Bytes
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
import { join } from 'path';
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import copy from 'rollup-plugin-copy-glob';
export default {
input: join('src', 'createMollieClient.ts'),
external: [
// These Node.js interenals are external to our bundles…
...['fs', 'https', 'path', 'url'],
// …as are the dependencies listed in our package.json.
...Object.keys(require('./package.json').dependencies),
],
output: [{ file: join('dist', 'mollie.cjs.js'), format: 'cjs' }, { file: join('dist', 'mollie.esm.js'), format: 'es' }],
plugins: [
json(),
resolve({
extensions: ['.ts'],
customResolveOptions: {
moduleDirectory: 'src',
},
preferBuiltins: true,
}),
babel({
extensions: ['.ts'],
}),
copy([{ files: join('src', 'cacert.pem'), dest: 'dist' }]),
],
};