Menu

vite build accessing system environment variables
📰

vite build accessing system environment variables

DEV Community·Roshan P Shajan·7 months ago
#jdt4tiHO
#vite#esbuild#software#coding#development
Reading 0:00
15s threshold

Roshan P Shajan

I have a module bundled and built with vite. I am able to run the vite server, but on building it with vite build, I get the following error.

Error: [commonjs--resolver] Transform failed with 2 errors:
error: The define key "process.env.ProgramFiles(x86)" contains invalid identifier "ProgramFiles(x86)"
error: The define key "process.env.CommonProgramFiles(x86)" contains invalid identifier "CommonProgramFiles(x86)"