chore: fixed config

This commit is contained in:
Jannat Patel
2023-11-30 16:03:06 +05:30
parent 92edb3a1bf
commit 644fb698d8
6 changed files with 242 additions and 266 deletions

View File

@@ -1,16 +1,11 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { getProxyOptions } from 'frappe-ui/src/utils/vite-dev-server'
import { webserver_port } from '../../../sites/common_site_config.json'
import frappeui from 'frappe-ui/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
port: 8080,
proxy: getProxyOptions({ port: webserver_port }),
},
plugins: [frappeui(), vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
@@ -20,6 +15,13 @@ export default defineConfig({
outDir: `../${path.basename(path.resolve('..'))}/public/frontend`,
emptyOutDir: true,
target: 'es2015',
rollupOptions: {
output: {
manualChunks: {
'frappe-ui': ['frappe-ui'],
},
},
},
},
optimizeDeps: {
include: ['frappe-ui > feather-icons', 'showdown', 'engine.io-client'],