-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
32 lines (30 loc) · 1.05 KB
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// see https://github.com/rozek/build-configuration-study
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript';
import { terser } from 'rollup-plugin-terser'
export default {
input: './src/svelte-drag-and-drop-actions.ts',
external:['javascript-interface-library','svelte-coordinate-conversion'],
output: [
{
file: './dist/svelte-drag-and-drop-actions.js',
format: 'umd', // builds for both Node.js and Browser
name: 'DragAndDropActions', // required for UMD modules
globals: {
'javascript-interface-library':'JIL',
'svelte-coordinate-conversion':'Conversion'
},
noConflict:true,
sourcemap: true,
plugins: [terser({ format:{ comments:false, safari10:true } })],
},{
file: './dist/svelte-drag-and-drop-actions.esm.js',
format: 'esm',
sourcemap:true
}
],
plugins: [
resolve({ browser:true, dedupe:['svelte'] }), commonjs(), typescript(),
],
};