ci: add ts support to svelte

This commit is contained in:
Derrick Hammer 2023-07-25 11:53:12 -04:00
parent 7a729934dd
commit 0e28646163
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import { svelte } from "@sveltejs/vite-plugin-svelte";
import { resolve } from "path"; import { resolve } from "path";
import optimizer from "vite-plugin-optimizer"; import optimizer from "vite-plugin-optimizer";
import { nodePolyfills } from "vite-plugin-node-polyfills"; import { nodePolyfills } from "vite-plugin-node-polyfills";
import autoPreprocess from "svelte-preprocess";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
@ -20,7 +21,9 @@ export default defineConfig({
dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"], dedupe: ["@lumeweb/libportal", "@lumeweb/libweb", "@lumeweb/libkernel"],
}, },
plugins: [ plugins: [
svelte(), svelte({
preprocess: autoPreprocess(),
}),
optimizer({ optimizer({
"node-fetch": "node-fetch":
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};", "const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",