Open leiyangyou opened 7 years ago
Hi @leiyangyou. Thanks for reaching out.
Can you please try to replace process.env.NODE_ENV
with process.env['NODE_ENV']
. Does it help?
Thanks. That's exactly what I ended up doing, although it meant that I had to clone and modify a third party library. I understand that doing envify properly would be hard (one way to achieve this is running the code through acorn first, do envify, then regenerate the code from the ast), for now at least it may make sense to have envify become a configurable plugin. I actually didn't know brunch has this functionality built in before and have been using plugins to achieve this. via Newton Mail [https://cloudmagic.com/k/d/mailapp?ct=pi&cv=9.3.50&pv=10.2&source=email_footer_2] On Fri, Dec 30, 2016 at 2:35 PM, Aleksey Shvayka notifications@github.com wrote: Hi @leiyangyou [https://github.com/leiyangyou] . Thanks for reaching out.
Can you please try to replace process.env.NODE_ENV with process.env['NODE_ENV'] . Does it help?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [https://github.com/brunch/deppack/issues/47#issuecomment-269737666] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AAGXzQtJQmqqpWkwutg6skUMmFzqJC4Gks5rNKZJgaJpZM4LX23d] .
That's exactly what I ended up doing, although it meant that I had to clone and modify a third party library.
That sucks.
Indeed, we will integrate AST-based solution, cause we have too many issues caused by the current one.
this particular string
when envified will break acorn as process.env.NODE_ENV is getting changed to 'development'