-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vite and vitest allow a singular configuration & leads to faster compile times!
- Loading branch information
1 parent
787095d
commit 89f05a8
Showing
9 changed files
with
70 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' | ||
|
||
export default { | ||
preprocess: vitePreprocess(), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { configDefaults, defineConfig } from 'vitest/config' | ||
import { svelte } from '@sveltejs/vite-plugin-svelte' | ||
import { viteStaticCopy } from 'vite-plugin-static-copy' | ||
import { resolve } from 'path' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
svelte({ | ||
emitCss: false, | ||
}), | ||
viteStaticCopy({ | ||
targets: [ | ||
{ | ||
src: "styles.css", | ||
dest: "", | ||
}, | ||
{ | ||
src: "manifest.json", | ||
dest: "", | ||
} | ||
] | ||
}), | ||
], | ||
build: { | ||
// We aren't building a website, so we build in library mode | ||
// and bundle the output using our index.ts as the entrypoint. | ||
lib: { | ||
entry: resolve(__dirname, "src/index.ts"), | ||
fileName: "main", | ||
formats: ["cjs"] | ||
}, | ||
rollupOptions: { | ||
external: ["obsidian"] | ||
} | ||
}, | ||
test: { | ||
watch: false, | ||
exclude: [...configDefaults.exclude, ".direnv/**/*"], | ||
} | ||
}) |