Skip to content

Commit

Permalink
Building frontend with vite
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Jan 15, 2025
1 parent f9db9b6 commit 5786e90
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 204 deletions.
6 changes: 3 additions & 3 deletions frontend.tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es6"
}
"include": [
"src/frontend/**/*.ts"
]
}
24 changes: 24 additions & 0 deletions frontend.vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import { defineConfig } from "vite";
import { viteSingleFile } from "vite-plugin-singlefile";

export default defineConfig({
build: {
outDir: "../../dist",
},
plugins: [
svelte({
onwarn: (warning, defaultHandler) => {
if (
warning.code === "vite-plugin-svelte-preprocess-many-dependencies"
) {
return;
}
defaultHandler?.(warning);
},
preprocess: vitePreprocess(),
}),
viteSingleFile({ removeViteModuleLoader: false }),
],
root: "src/frontend/",
});
Loading

0 comments on commit 5786e90

Please sign in to comment.