chore: Typescript: Rewrite Configs (#21763)
This commit is contained in:
parent
44bcb6875b
commit
54419f9e7d
13 changed files with 121 additions and 28 deletions
44
vite.config.ts
Normal file
44
vite.config.ts
Normal 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" }),
|
||||
],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue