forked from Maks113/react-mobile-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
39 lines (37 loc) · 1.09 KB
/
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
35
36
37
38
39
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
import memory from 'rollup-plugin-memory';
import postcss from 'rollup-plugin-postcss';
import fs from 'fs';
var babelRc = JSON.parse(fs.readFileSync('.babelrc','utf8')); // eslint-disable-line
export default {
input: './lib/index.js',
exports: 'default',
globals: {
'react': 'React',
'react-dom': 'ReactDOM'
},
plugins: [
postcss({
plugins: [
require('postcss-import')(),
require('postcss-url')(),
require('postcss-cssnext')(),
require('postcss-mixins'),
require('postcss-nested')(),
],
extensions: ['.css'],
}),
json(),
memory({
path: 'lib/index',
contents: "export { default } from './index'",
}),
babel({
babelrc: false,
presets: ['es2015-rollup'].concat(babelRc.presets.slice(1)),
plugins: babelRc.plugins,
exclude: 'node_modules/**',
}),
],
};