-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
37 lines (36 loc) · 1.13 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
import babel from '@rollup/plugin-babel'
import pkg from './package.json'
export default [
{
input: 'src/main.js',
external: [
'@babel/runtime/helpers/applyDecoratedDescriptor',
'@babel/runtime/helpers/asyncToGenerator',
'@babel/runtime/helpers/classCallCheck',
'@babel/runtime/helpers/createClass',
'@babel/runtime/helpers/defineProperty',
'@babel/runtime/helpers/getPrototypeOf',
'@babel/runtime/helpers/inherits',
'@babel/runtime/helpers/initializerDefineProperty',
'@babel/runtime/helpers/initializerWarningHelper',
'@babel/runtime/helpers/objectSpread',
'@babel/runtime/helpers/possibleConstructorReturn',
'@babel/runtime/helpers/slicedToArray',
'@babel/runtime/regenerator',
'@babel/runtime/helpers/assertThisInitialized',
'@babel/runtime/helpers/toConsumableArray',
'@babel/runtime/helpers/wrapNativeSuper'
],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
],
plugins: [
babel({
exclude: ['node_modules/**'],
babelHelpers: 'runtime',
plugins: [['@babel/transform-runtime', { regenerator: true, useESModules: false }]]
})
]
}
];