forked from lchreal6/react-swipeable-tab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
34 lines (33 loc) · 876 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
34
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import babel from "rollup-plugin-babel";
import pkg from "./package.json";
import { uglify } from 'rollup-plugin-uglify'
import postcss from 'rollup-plugin-postcss'
export default {
input: "./src/components/Tabs/index.js",
output: {
name: "react-swipeable-tab",
file: pkg.main,
format: "umd",
},
plugins: [
postcss(),
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [ [ '@babel/env', { modules: false } ], '@babel/react' ],
plugins: ['@babel/plugin-proposal-class-properties']
}),
resolve(), // so Rollup can find `ms`
commonjs(), // so Rollup can convert `ms` to an ES module
uglify({
output: {
preamble: `/* eslint-disable */`
}
})
],
external: [
'react'
],
};