You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/vite.config.ts

44 lines
993 B

import { defineConfig, type PluginOption } from "vite";
import path from "path";
import vue from "@vitejs/plugin-vue";
import Components from "unplugin-vue-components/vite";
2 years ago
import { visualizer } from "rollup-plugin-visualizer";
import { NaiveUiResolver } from "unplugin-vue-components/resolvers";
2 years ago
// https://vitejs.dev/config/
export default defineConfig({
server: {
host: "0.0.0.0",
2 years ago
},
plugins: [
vue({
reactivityTransform: [/src/],
}),
2 years ago
Components({
resolvers: [NaiveUiResolver()],
}),
visualizer() as PluginOption,
2 years ago
],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
build: {
chunkSizeWarningLimit: 1000,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("node_modules")) {
return id
.toString()
.split("node_modules/")[1]
.split("/")[0]
.toString();
}
},
},
2 years ago
},
},
});