You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
947 B
JavaScript
26 lines
947 B
JavaScript
import typescript from '@rollup/plugin-typescript';
|
|
import terser from '@rollup/plugin-terser';
|
|
import dts from 'rollup-plugin-dts';
|
|
|
|
export default [
|
|
{
|
|
input: 'src/index.ts',
|
|
external: ['leaflet'],
|
|
plugins: [typescript({ declaration: false, declarationMap: false })],
|
|
output: [
|
|
{ format: 'es', file: 'dist/index.js' },
|
|
{ format: 'es', file: 'dist/index.min.js', plugins: [terser()] },
|
|
{ format: 'cjs', file: 'dist/index.cjs' },
|
|
{ format: 'cjs', file: 'dist/index.min.cjs', plugins: [terser()] },
|
|
{ format: 'umd', name: 'LeafletComponents', file: 'dist/index.umd.js', globals: { leaflet: 'L' } },
|
|
{ format: 'umd', name: 'LeafletComponents', file: 'dist/index.umd.min.js', globals: { leaflet: 'L' }, plugins: [terser()] },
|
|
],
|
|
},
|
|
{
|
|
input: 'src/index.ts',
|
|
external: ['leaflet'],
|
|
plugins: [dts()],
|
|
output: { format: 'es', file: 'dist/index.d.ts' },
|
|
},
|
|
];
|