forked from pngwn/MDsveX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
41 lines (39 loc) · 924 Bytes
/
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
33
34
35
36
37
38
39
40
41
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import pkg from './package.json';
export default [
{
plugins: [
resolve({ preferBuiltins: true }),
commonjs({ namedExports: { 'svelte/compiler': ['parse'] } }),
json(),
],
input: 'src/index.js',
external: ['svelte/compiler'],
output: [
{ file: pkg.module, format: 'es', sourcemap: false },
{ file: pkg.main, format: 'cjs', sourcemap: false },
],
},
{
plugins: [
resolve({ browser: true }),
commonjs({ namedExports: { 'svelte/compiler': ['parse'] } }),
json(),
globals(),
builtins(),
],
input: 'src/index.js',
output: [
{
file: 'dist/mdsvex.js',
name: 'mdsvex',
format: 'umd',
sourcemap: false,
},
],
},
];