-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
33 lines (31 loc) · 892 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
27
28
29
30
31
32
33
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';
export default {
input: './src/IFramePlayground.jsx',
output: { file: './dist/IFramePlayground.min.js', format: 'esm' },
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
resolve(),
commonjs(),
babel({
presets: [
'@babel/preset-react',
['@babel/preset-env', { modules: false }],
],
plugins: ['@babel/plugin-proposal-class-properties'],
babelrc: false,
}),
terser(),
postcss({
modules: true,
}),
],
external: Object.keys(pkg.peerDependencies),
};