forked from lyken/tencent-share
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
54 lines (50 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
49
50
51
52
53
54
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import builtins from 'rollup-plugin-node-builtins';
// import ts from 'rollup-plugin-typescript2';
// import typescript from 'typescript'
const config = require( './package' );
const banner =
'/*!\n' +
' * Share.js v' + config.version + '\n' +
' * last update: ' + (new Date()).toLocaleString() + ', author: skeetershi\n' +
' * Released under the MIT License.\n' +
' */'
const sconfig = {
index:{
input: './src/index.js',
output: './dist/bundle.js'
},
test:{
input: './src/test.js',
output: './dist/test1.js'
}
};
const mubiao = sconfig['index'];
export default {
input: mubiao.input,
plugins: [
resolve(),
builtins(),
commonjs({
include: "node_modules/**"
}),
babel({
exclude: './node_modules/**',
runtimeHelpers: true,
plugins: [
'external-helpers',
"transform-runtime"
]
})
],
output: {
file: mubiao.output,
moduleName: 'Share',
format: 'umd',
name: 'Share',
globals: 'Share',
banner: banner
}
};