forked from grab/mobile-kit-bridge-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
38 lines (36 loc) · 888 Bytes
/
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
import commonJs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import sourceMap from 'rollup-plugin-sourcemaps';
import typescript from 'rollup-plugin-typescript2';
import { uglify } from 'rollup-plugin-uglify';
import pkg from './package.json';
function createConfig({ file = 'dist/index.js' }) {
return {
input: 'src/index.ts',
output: {
format: 'umd',
file,
name: 'bridgeSDK',
sourcemap: false
},
external: [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.peerDependencies || {})
],
plugins: [
typescript({
tsconfigOverride: {
compilerOptions: {
target: 'es5',
module: 'es2015'
}
}
}),
commonJs(),
resolve(),
sourceMap(),
uglify()
]
};
}
export default [createConfig({})];