You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
869 B
32 lines
869 B
7 years ago
|
import resolve from 'rollup-plugin-node-resolve';
|
||
|
import commonjs from 'rollup-plugin-commonjs';
|
||
|
import babel from 'rollup-plugin-babel';
|
||
|
import browsersync from 'rollup-plugin-browsersync';
|
||
|
import replace from 'rollup-plugin-replace';
|
||
|
import uglify from 'rollup-plugin-uglify';
|
||
|
import filesize from 'rollup-plugin-filesize';
|
||
|
import lint from 'rollup-plugin-eslint';
|
||
|
|
||
|
export default {
|
||
|
name: 'Pillar',
|
||
|
input: 'src/index.js',
|
||
|
output: {
|
||
|
file: 'dist/index.js',
|
||
|
format: 'umd',
|
||
|
},
|
||
|
plugins: [
|
||
|
lint(),
|
||
|
replace({
|
||
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), // For Invariant
|
||
|
}),
|
||
|
babel({
|
||
|
exclude: ['node_modules/**'],
|
||
|
}),
|
||
|
resolve(),
|
||
|
commonjs(),
|
||
|
process.env.NODE_ENV === 'production' && uglify(),
|
||
|
process.env.NODE_ENV === 'production' && filesize(),
|
||
|
process.env.NODE_ENV !== 'production' && browsersync(), // Live server
|
||
|
],
|
||
|
};
|