Skip to content

Commit

Permalink
feat: export oss chunks of vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
elevatebart committed Jan 21, 2025
1 parent c337d55 commit b542dda
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,32 @@ import vue from "@vitejs/plugin-vue";
import {filename} from "./plugins/filename"
import {commit} from "./plugins/commit"

export const manualChunks = {
// bundle dashboard and all its dependencies in a single chunk
"dashboard": [
"src/components/dashboard/Dashboard.vue",
"src/components/dashboard/components/DashboardCreate.vue",
"src/components/dashboard/components/DashboardEdit.vue"
],
// bundle flows and all its dependencies in a second chunk
"flows": [
"src/components/flows/Flows.vue",
"src/components/flows/FlowCreate.vue",
"src/components/flows/FlowsSearch.vue",
"src/components/flows/FlowRoot.vue"
],
"markdown": [
"src/utils/markdown.js"
]
}

export default defineConfig({
base: "",
build: {
outDir: "../webserver/src/main/resources/ui",
rollupOptions: {
output: {
manualChunks: {
// bundle dashboard and all its dependencies in a single chunk
"dashboard": [
"src/components/dashboard/Dashboard.vue",
"src/components/dashboard/components/DashboardCreate.vue",
"src/components/dashboard/components/DashboardEdit.vue"
],
// bundle flows and all its dependencies in a second chunk
"flows": [
"src/components/flows/Flows.vue",
"src/components/flows/FlowCreate.vue",
"src/components/flows/FlowsSearch.vue",
"src/components/flows/FlowRoot.vue"
]
}
manualChunks
}
},
},
Expand Down

0 comments on commit b542dda

Please sign in to comment.