Skip to content

Commit 502e861

Browse files
authored
fix: incorrect build for non-external dependencies (#2)
Signed-off-by: Neko Ayaka <[email protected]>
1 parent 223757f commit 502e861

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ export default defineBuildConfig({
66
sourcemap: true,
77
declaration: false,
88
externals: [
9-
'ofetch',
10-
// UnoCSS
11-
'unocss',
12-
'@unocss/core',
139
// Obsidian
1410
'obsidian',
1511
'electron',
@@ -42,5 +38,10 @@ export default defineBuildConfig({
4238
sourcemap: true,
4339
entryFileNames: 'main.js',
4440
},
41+
// required for unocss, ofetch, etc.
42+
// otherwise unbuild will detect them as external
43+
// dependencies that are inline implicitly external
44+
// by esbuild
45+
inlineDependencies: true,
4546
},
4647
})

0 commit comments

Comments
 (0)