2020-02-21 01:49:22 +08:00
|
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
|
|
import {terser} from 'rollup-plugin-terser';
|
|
|
|
|
|
|
|
export default {
|
2020-03-01 23:08:02 +08:00
|
|
|
input: 'js/heti-addon.js',
|
2020-02-21 01:49:22 +08:00
|
|
|
output: [
|
|
|
|
{
|
|
|
|
file: '_site/heti-addon.js',
|
|
|
|
name: 'Heti',
|
|
|
|
format: 'umd'
|
|
|
|
},
|
|
|
|
{
|
2020-03-04 14:21:21 +08:00
|
|
|
file: 'umd/heti-addon.min.js',
|
2020-02-21 01:49:22 +08:00
|
|
|
format: 'umd',
|
|
|
|
name: 'Heti',
|
|
|
|
plugins: [
|
|
|
|
terser({
|
2020-03-15 20:58:23 +08:00
|
|
|
compress: {
|
|
|
|
pure_funcs: ["console.info"] // 移除调试信息
|
|
|
|
},
|
2020-02-21 01:49:22 +08:00
|
|
|
output: {
|
|
|
|
comments: false
|
|
|
|
}
|
|
|
|
})
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
]
|
|
|
|
};
|