-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrollup.config.js
More file actions
28 lines (27 loc) · 838 Bytes
/
rollup.config.js
File metadata and controls
28 lines (27 loc) · 838 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
const path = require('path')
const babel = require('@rollup/plugin-babel').babel
const resolve = require('@rollup/plugin-node-resolve').nodeResolve
const commonjs = require('@rollup/plugin-commonjs').default
module.exports = {
input: path.resolve(__dirname, 'index.js'),
output: {
file: path.resolve(__dirname, 'dist/SAM.js'),
format: 'umd',
name: 'tp'
},
plugins: [
resolve(),
commonjs({ include: 'node_modules/**' }),
babel({
exclude: 'node_modules/**',
babelHelpers: 'bundled',
configFile: false,
babelrc: false,
presets: [['@babel/preset-env', { targets: 'Chrome >= 80, Firefox >= 75, Safari >= 13.1, Node >= 14' }]],
plugins: [
'@babel/plugin-transform-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator'
]
})
]
}