DEV Community

Hoàng Nguyễn
Hoàng Nguyễn

Posted on

Why does it throw the error "'process' is not defined."?

vite.config.js

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: process.env.VITE_APP_PORT || 3000, // Cổng cho server phát triển
},
build: {
outDir: 'dist', // Thư mục xuất ra sau khi build
},
});

Top comments (0)