- update port for developmnet mode
This commit is contained in:
parent
cd66fd6ffa
commit
b05378ea2e
@ -1,4 +1,5 @@
|
|||||||
VITE_APP_NAME="Kamil Niemczycki CV"
|
VITE_APP_NAME="Kamil Niemczycki CV"
|
||||||
VITE_CV_URL="http://localhost:5173"
|
VITE_CV_URL="http://localhost:5173"
|
||||||
|
VITE_PORT=5173
|
||||||
VITE_API_URL="http://localhost"
|
VITE_API_URL="http://localhost"
|
||||||
VITE_SOURCE_CODE="https://github.com/kamilniemczycki"
|
VITE_SOURCE_CODE="https://github.com/kamilniemczycki"
|
||||||
|
@ -1,13 +1,25 @@
|
|||||||
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite';
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
import { networkInterfaces } from 'os';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig((mode) => {
|
||||||
plugins: [ vue(), splitVendorChunkPlugin() ],
|
const env = loadEnv(mode, process.cwd(), "");
|
||||||
resolve: {
|
return {
|
||||||
vue: 'vue/dist/vue.esm-bundler.js',
|
server: {
|
||||||
},
|
//host: Object.values(networkInterfaces()).flat().find(i => i.family === 'IPv4' && !i.internal).address,
|
||||||
build: {
|
host: 'localhost',
|
||||||
chunkSizeWarningLimit: 2048,
|
port: parseInt(env.VITE_PORT ?? 5173),
|
||||||
},
|
hmr: {
|
||||||
|
host: 'localhost',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [ vue(), splitVendorChunkPlugin() ],
|
||||||
|
resolve: {
|
||||||
|
vue: 'vue/dist/vue.esm-bundler.js',
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
chunkSizeWarningLimit: 2048,
|
||||||
|
},
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user