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

dt2301

Hoàng Nguyễn

Posted on November 6, 2024

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
},
});

💖 💪 🙅 🚩
dt2301
Hoàng Nguyễn

Posted on November 6, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related