Open silverwind opened 4 years ago
Caution: on Windows, there are default environment variable names that contain (
character, such as ProgramFiles(x86)
.
If they are defined as part of options by default, it will cause error on this line:
https://github.com/nippur72/ifdef-loader/blob/5018e6437fb6d8d37568d3003e2c2e6b4dd8ad49/preprocessor.ts#L209
See https://github.com/kenpb/parcel-plugin-ifdef/issues/2 for more information.
I think it'd make sense to define everything in
process.env
by default, so instead ofone can do a more standard
Variables defined in
options
should overwrite bare variables likeNODE_ENV
butprocess.env
should always reflect the actual environment.I imagine this would allow to integrate the loader with default options in most cases.