config-router/rollup.config.js

35 lines
703 B
JavaScript
Raw Normal View History

2021-10-22 18:09:06 +08:00
import babel from 'rollup-plugin-babel';
import { uglify } from 'rollup-plugin-uglify';
import typescript from 'rollup-plugin-typescript2';
import buble from 'rollup-plugin-buble';
2021-10-22 18:24:36 +08:00
import dts from 'rollup-plugin-dts';
import path from 'path';
2021-10-22 18:09:06 +08:00
2021-10-22 18:24:36 +08:00
const resolve = (...args) => path.resolve(...args);
export default [
{
input: 'src/index.tsx',
output: {
file: 'dist/index.js',
format: 'es',
},
plugins: [
typescript(),
babel({
exclude: 'node_modules/**',
}),
uglify(),
buble(),
],
},
{
input: resolve('src/index.tsx'),
output: {
file: 'dist/types/index.d.ts',
format: 'es',
},
plugins: [dts()],
2021-10-22 18:09:06 +08:00
},
2021-10-22 18:24:36 +08:00
];