generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathdev.config.mjs
32 lines (30 loc) · 768 Bytes
/
dev.config.mjs
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
import esbuild from "esbuild";
import sveltePlugin from "esbuild-svelte";
import process from "process";
import autoPreprocess from "svelte-preprocess";
const banner =
`/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository (https://github.com/phibr0/obsidian-dictionary)
*/
`;
esbuild.build({
banner: {
js: banner,
},
entryPoints: ['src/main.ts'],
bundle: true,
external: ['obsidian'],
format: 'cjs',
minify: true,
watch: true,
logLevel: "info",
plugins: [sveltePlugin({
compileOptions: {
css: true,
dev: true,
},
preprocess: autoPreprocess(),
})],
outfile: 'main.js',
}).catch(() => process.exit(1));