28 lines
555 B
TypeScript
28 lines
555 B
TypeScript
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
import plugins from "./src/plugin/common-plugins";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"/@src": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes("node_modules")) {
|
|
return id
|
|
.toString()
|
|
.split("node_modules/")[1]
|
|
.split("/")[0]
|
|
.toString();
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins,
|
|
});
|