forked from ivan-lednev/obsidian-day-planner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
33 lines (31 loc) · 882 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
import typescript from '@rollup/plugin-typescript';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import copy from 'rollup-plugin-copy';
import svelte from "rollup-plugin-svelte";
import autoPreprocess from 'svelte-preprocess';
const TEST_VAULT = 'test-vault/.obsidian/plugins/obsidian-day-planner';
export default {
input: 'src/main.ts',
output: {
dir: 'dist/',
sourcemap: 'inline',
format: 'cjs',
exports: 'default'
},
external: ['obsidian'],
plugins: [
typescript(),
nodeResolve({browser: true}),
commonjs(),
svelte({
preprocess: autoPreprocess()
}),
copy({
targets: [
{ src: 'dist/main.js', dest: TEST_VAULT },
{ src: ['manifest.json', 'styles.css'], dest: TEST_VAULT }
], flatten: true
})
]
};