2022-01-10 18:41:53 +03:00
|
|
|
import typescript from 'rollup-plugin-typescript2';
|
|
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
|
|
import babel from '@rollup/plugin-babel';
|
|
|
|
import { terser } from 'rollup-plugin-terser';
|
|
|
|
|
|
|
|
const config = [
|
|
|
|
{
|
|
|
|
input: 'src/index.ts',
|
|
|
|
output: {
|
|
|
|
name: 'map2tree',
|
2022-01-24 05:11:46 +03:00
|
|
|
file: 'lib/umd/map2tree.js',
|
2022-01-10 18:41:53 +03:00
|
|
|
format: 'umd',
|
|
|
|
},
|
|
|
|
plugins: [
|
2022-01-24 05:11:46 +03:00
|
|
|
typescript({
|
|
|
|
tsconfigOverride: { compilerOptions: { declaration: false } },
|
|
|
|
}),
|
2022-01-10 18:41:53 +03:00
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: 'runtime',
|
|
|
|
extensions: ['.ts'],
|
|
|
|
plugins: ['@babel/plugin-transform-runtime'],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
input: 'src/index.ts',
|
|
|
|
output: {
|
|
|
|
name: 'map2tree',
|
2022-01-24 05:11:46 +03:00
|
|
|
file: 'lib/umd/map2tree.min.js',
|
2022-01-10 18:41:53 +03:00
|
|
|
format: 'umd',
|
|
|
|
},
|
|
|
|
plugins: [
|
2022-01-24 05:11:46 +03:00
|
|
|
typescript({
|
|
|
|
tsconfigOverride: { compilerOptions: { declaration: false } },
|
|
|
|
}),
|
2022-01-10 18:41:53 +03:00
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
babel({
|
|
|
|
babelHelpers: 'runtime',
|
|
|
|
extensions: ['.ts'],
|
|
|
|
plugins: ['@babel/plugin-transform-runtime'],
|
|
|
|
}),
|
|
|
|
terser(),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export default config;
|