dockge/frontend/vite.config.ts

37 lines
985 B
TypeScript
Raw Permalink Normal View History

2023-10-23 11:30:58 +00:00
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import Components from "unplugin-vue-components/vite";
import { BootstrapVueNextResolver } from "unplugin-vue-components/resolvers";
import viteCompression from "vite-plugin-compression";
import "vue";
const viteCompressionFilter = /\.(js|mjs|json|css|html|svg)$/i;
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 5000,
},
2023-11-07 12:47:16 +00:00
define: {
"FRONTEND_VERSION": JSON.stringify(process.env.npm_package_version),
},
2023-10-23 11:30:58 +00:00
root: "./frontend",
build: {
2023-10-26 05:23:45 +00:00
outDir: "../frontend-dist",
2023-10-23 11:30:58 +00:00
},
plugins: [
vue(),
Components({
resolvers: [ BootstrapVueNextResolver() ],
}),
viteCompression({
algorithm: "gzip",
filter: viteCompressionFilter,
}),
viteCompression({
algorithm: "brotliCompress",
filter: viteCompressionFilter,
}),
],
});