changed build workflow – for auth it's required to have better control over html and assets

This commit is contained in:
dswbx
2024-11-27 16:19:37 +01:00
parent d36c4b07e0
commit c31bc2ccb0
21 changed files with 559 additions and 285 deletions

View File

@@ -1,7 +1,6 @@
import devServer from "@hono/vite-dev-server";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { defineConfig, loadEnv } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
// https://vitejs.dev/config/
@@ -45,18 +44,5 @@ export default defineConfig(async () => {
};
}
return {
define: {
__isDev: "0"
},
publicDir: "./src/ui/assets",
build: {
manifest: true,
outDir: "dist/static"
/*rollupOptions: { // <-- use this to not require index.html
input: "./src/ui/main.tsx"
}*/
},
plugins: [react(), tsconfigPaths()]
} as any;
throw new Error("Don't use vite for building in production");
});