-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
41 lines (39 loc) · 893 Bytes
/
rollup.config.js
File metadata and controls
41 lines (39 loc) · 893 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
29
30
31
32
33
34
35
36
37
38
39
40
41
import { terser } from 'rollup-plugin-terser'
import commonjs from '@rollup/plugin-commonjs'
import babel from '@rollup/plugin-babel'
export default {
input: 'src/index.js',
external: [
'mobx-state-tree',
'mobx',
'mobx-react',
'prop-types',
'react',
'react-dom',
'react-router-dom',
'styled-components',
'react-is',
],
output: {
exports: 'named',
format: 'es',
file: 'dist/index.mjs',
sourcemap: true,
},
plugins: [
babel({
exclude: /node_modules/,
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
['inline-react-svg'],
['@babel/plugin-transform-react-jsx'],
['@babel/plugin-proposal-class-properties', { loose: true }],
['transform-modern-regexp'],
],
babelHelpers: 'bundled',
}),
commonjs(),
terser(),
],
context: 'window',
}