You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot mutate NODE_ENV to "production" in my library, as other references are coupled to NODE_ENV as well. Global mutations are also discouraged as general programming practice, and my library is permissible to use in development.
Details
describe what the expected behaviour is, and what is actually happening
expected: The emitted code emits no environment warning in the emitted javascript
actual: The emitted code emits an environment warning in the emitted javascript
getPolyfillString can be a pure function, but has implicit coupling to being attached to the pf.io service
add steps on how to reproduce it
Call getPolyfillString() with a non-production NODE_ENV, observe JS output
explain what alternatives you have explored / considered
constappVersionText=options.appVersionText
? options.appVersionText
: "Polyfill service "+(process.env.NODE_ENV==="production"
? "v"+appVersion
: "DEVELOPMENT MODE - for live use set NODE_ENV to 'production'")
The text was updated successfully, but these errors were encountered:
What
getPolyfillString()
emits an ENV warning in the emitted javascript, against expectation.I call
getPolyfillString
from library code, not via a service, however, getPolyfillString assumes it's being run as a service, and reads the ENV vs its passed params.I cannot mutate NODE_ENV to "production" in my library, as other references are coupled to
NODE_ENV
as well. Global mutations are also discouraged as general programming practice, and my library is permissible to use in development.Details
expected: The emitted code emits no environment warning in the emitted javascript
actual: The emitted code emits an environment warning in the emitted javascript
getPolyfillString
can be a pure function, but has implicit coupling to being attached to the pf.io serviceCall
getPolyfillString()
with a non-production NODE_ENV, observe JS outputPermit
appVersionText
to be configurable here.example:
The text was updated successfully, but these errors were encountered: