2018-11-04 14:32:14 -07:00
|
|
|
import buble from 'rollup-plugin-buble'
|
|
|
|
|
import { uglify } from 'rollup-plugin-uglify'
|
|
|
|
|
|
|
|
|
|
const pkg = require('./package.json')
|
|
|
|
|
|
|
|
|
|
const output = {
|
|
|
|
|
format: 'umd',
|
|
|
|
|
file: pkg.main,
|
|
|
|
|
name: 'Split',
|
|
|
|
|
sourcemap: false,
|
|
|
|
|
banner: `/*! Split.js - v${pkg.version} */\n`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default [
|
|
|
|
|
{
|
|
|
|
|
input: 'src/split.js',
|
2018-11-07 10:08:06 -07:00
|
|
|
output: [
|
|
|
|
|
output,
|
|
|
|
|
{
|
|
|
|
|
file: pkg.module,
|
|
|
|
|
format: 'esm',
|
|
|
|
|
sourcemap: false,
|
|
|
|
|
},
|
|
|
|
|
],
|
2018-11-04 14:32:14 -07:00
|
|
|
plugins: [buble()],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
input: 'src/split.js',
|
|
|
|
|
output: {
|
|
|
|
|
...output,
|
|
|
|
|
sourcemap: true,
|
|
|
|
|
file: pkg['minified:main'],
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
buble(),
|
|
|
|
|
uglify({
|
|
|
|
|
output: {
|
|
|
|
|
comments: /^!/,
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
]
|