canjs / can-bind

Updates one observable value with the value of another observable.
https://canjs.com/doc/can-bind.html
MIT License
4 stars 0 forks source link

Please remove NodeJS Only references or check if they exist befor using them #28

Closed frank-dspeed closed 4 years ago

frank-dspeed commented 4 years ago
if(process.env.NODE_ENV === 'production') {

will throw in the browser as process will not exist.

frank-dspeed commented 4 years ago

you should maybe solve that in your steal loader to conditional return other modules for production and dev but please not in the module it self else its simply not use able.

frank-dspeed commented 4 years ago

as a workaround i did simply Mock window.process.ENV but that has undesired side effects and i want to drop that.

frank-dspeed commented 4 years ago

Ok i found out its a sub dependency that causes the error as all process.env is excluded here via steal-remove