Skip to content

Commit

Permalink
Add support for svelte components
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Eskild Steensen committed Sep 12, 2023
1 parent 888c74d commit 8e9b729
Show file tree
Hide file tree
Showing 4 changed files with 10,355 additions and 9,835 deletions.
9 changes: 8 additions & 1 deletion esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import esbuild from "esbuild";
import process from "process";
import builtins from 'builtin-modules'
import esbuildSvelte from "esbuild-svelte";
import sveltePreprocess from "svelte-preprocess";

const banner =
`/*
Expand All @@ -19,10 +21,15 @@ esbuild.build({
bundle: true,
external: ['obsidian', 'electron', ...builtins],
format: 'cjs',
watch: !prod,
target: 'es2016',
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
plugins: [
esbuildSvelte({
compilerOptions: { css: 'injected'},
preprocess: sveltePreprocess(),
}),
],
}).catch(() => process.exit(1));
Loading

0 comments on commit 8e9b729

Please sign in to comment.