-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.common.js
45 lines (42 loc) · 1.11 KB
/
rollup.config.common.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
import alias from '@rollup/plugin-alias'
import buble from '@rollup/plugin-buble'
import commonjs from '@rollup/plugin-commonjs'
import inject from '@rollup/plugin-inject'
import resolve from '@rollup/plugin-node-resolve'
import babel from '@rollup/plugin-babel'
import PACKAGE from './package.json'
export function createUMDConfig(merger) {
return merger({
output: {
exports: 'named',
banner: `/* Copyright ${new Date().getUTCFullYear()} Skedify NV */`,
format: 'umd',
name: 'Skedify',
file: PACKAGE.main,
},
plugins: [
alias({
resolve: ['.js', ''],
}),
resolve({
mainFields: ['module', 'jsnext', 'main', 'browser'],
browser: true,
extensions: ['.js', '/index.js'],
preferBuiltins: false,
}),
commonjs(),
babel({
include: ['node_modules/axios/**', 'src/**'],
babelHelpers: 'bundled',
}),
buble({
namedFunctionExpressions: false,
objectAssign: 'Object.assign',
}),
inject({
include: '**/*.js',
exclude: 'node_modules/**',
}),
],
})
}