Skip to content

Commit

Permalink
svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
hdykokd committed May 14, 2024
1 parent 9cf5db9 commit 1b55dce
Show file tree
Hide file tree
Showing 4 changed files with 1,124 additions and 2 deletions.
9 changes: 9 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import esbuild from 'esbuild';
import esbuildSvelte from 'esbuild-svelte';
import sveltePreprocess from 'svelte-preprocess';
import process from 'process';
import builtins from 'builtin-modules';

Expand All @@ -11,11 +13,18 @@ if you want to view the source, please visit the github repository of this plugi
const prod = process.argv[2] === 'production';

const context = await esbuild.context({
plugins: [
esbuildSvelte({
compilerOptions: { css: true },
preprocess: sveltePreprocess(),
}),
],
banner: {
js: banner,
},
entryPoints: ['src/main.ts'],
bundle: true,
minify: prod === true,
external: [
'obsidian',
'electron',
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@
"author": "hdykokd",
"license": "MIT",
"devDependencies": {
"@tsconfig/svelte": "^5.0.4",
"@types/node": "16.18.97",
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"builtin-modules": "3.3.0",
"esbuild": "0.17.3",
"esbuild-svelte": "^0.8.0",
"obsidian": "latest",
"svelte": "^4.2.17",
"svelte-preprocess": "^5.1.4",
"tslib": "2.4.0",
"typescript": "4.7.4"
"typescript": "4.7.4",
"vitest": "^1.6.0"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 1b55dce

Please sign in to comment.