chore: Typescript: Rewrite Configs (#21763)

This commit is contained in:
Maschga 2025-09-28 11:10:24 +02:00 • committed by GitHub
parent 44bcb6875b
commit 54419f9e7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 121 additions and 28 deletions

44
vite.config.ts Normal file
View file

@ -0,0 +1,44 @@
import { defineConfig } from "vite";
import vuePlugin from "@vitejs/plugin-vue";
import legacy from "@vitejs/plugin-legacy";
import { visualizer } from "rollup-plugin-visualizer";
import path from "path";
export default defineConfig({
root: "./assets",
publicDir: "public",
base: "./",
resolve: {
alias: {
"@": path.resolve(__dirname, "./assets/js"),
},
},
build: {
outDir: "../dist/",
emptyOutDir: true,
assetsInlineLimit: 1024,
chunkSizeWarningLimit: 800, // legacy build increases file size
},
server: {
port: 7071,
proxy: {
"/api": "http://localhost:7070",
"/i18n": "http://localhost:7070",
"/ws": { target: "ws://localhost:7070", ws: true },
},
},
plugins: [
legacy({
targets: ["defaults", "iOS >= 14"],
modernPolyfills: ["es.promise.all-settled"],
}),
vuePlugin({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("shopicon-"),
},
},
}),
visualizer({ filename: "asset-stats.html" }),
],
});