mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 20:29:13 +02:00
feat:#31 added resolve and compression
This commit is contained in:
@@ -17,11 +17,16 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import terser from "@rollup/plugin-terser";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
plugins: [
|
||||
vue(),
|
||||
resolve(),
|
||||
terser(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
@@ -42,6 +47,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
build: {
|
||||
sourcemap: true,
|
||||
minify: "terser",
|
||||
terserOptions: {
|
||||
compress: {
|
||||
@@ -49,5 +55,15 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
cssMinify: "esbuild",
|
||||
cssCodeSplit: true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes("node_modules")) {
|
||||
return id.toString().split("node_modules/")[1].split("/")[0].toString()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user