-
Notifications
You must be signed in to change notification settings - Fork 5
/
rollup.config.js
26 lines (25 loc) · 774 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
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
import nodeResolve from 'rollup-plugin-node-resolve';
import autoExternal from 'rollup-plugin-auto-external';
export default {
input: 'src/index.js',
plugins: [
autoExternal(),
nodeResolve({mainFields: ['module']}),
json(),
babel({
babelrc: false,
exclude: ['./node_modules/**'],
presets: [
['@dsmjs', {targets: {browser: true}, react: true, modules: false}],
'@emotion/babel-preset-css-prop'
],
plugins: [['transform-react-remove-prop-types', {mode: 'wrap'}]]
})
],
output: [
{file: 'lib/components.cjs.js', format: 'cjs', sourcemap: true},
{file: 'lib/components.es.js', format: 'es', sourcemap: true}
]
};