forked from berkmancenter/nymspace_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
32 lines (31 loc) · 1.02 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
// Load env file based on `mode` in the current working directory.
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [vue()],
build: {
rollupOptions: {
output: {
manualChunks: {
// Grouping components of home page on single file
"home-page": [
"./src/layout/HomePageLayout.vue",
"./src/layout/LandingPageLayout.vue",
"./src/components/Shared/Modal.vue",
"./src/views/LandingPage.vue",
"./src/components/Banner/LoggedInBanner.vue",
],
},
},
},
},
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
base: `${env.VITE_PATH}/` ? env.VITE_PATH : "/",
};
});