Added libs
This commit is contained in:
44
vueNoSys/vite.config.js
Normal file
44
vueNoSys/vite.config.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
import fs from 'fs';
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default ({ mode }) => {
|
||||
|
||||
process.env = {...process.env, ...loadEnv(mode, process.cwd())};
|
||||
|
||||
return defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vueDevTools(),
|
||||
],
|
||||
server: {
|
||||
port: parseInt(process.env.VITE_PORT),
|
||||
// allowedHosts: ["lucasinacio.duckdns.org"],
|
||||
https: {
|
||||
key: fs.readFileSync('../api/certs/key.pem'),
|
||||
cert: fs.readFileSync('../api/certs/cert.pem'),
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: process.env.VITE_BACKEND_API_URL,
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
esbuild: {
|
||||
supported: {
|
||||
'top-level-await': true
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user