Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] The auto replacement of "process.env.NODE_ENV" could be explained more clearly in doc #4778

Closed
7 tasks done
ZYinMD opened this issue Aug 28, 2021 · 1 comment · Fixed by #4843
Closed
7 tasks done
Labels
documentation Improvements or additions to documentation pending triage

Comments

@ZYinMD
Copy link

ZYinMD commented Aug 28, 2021

Describe the bug

It's fine that the string "process.env.NODE_ENV" is auto replaced, but some of its unexpected behavior isn't mentioned in the doc, and causes some surprises. I think it'd be great to explain it a bit more on this page.

Reproduction

alert("process.env.NODE_ENV"); // SyntaxError: missing ) after argument list

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
    Memory: 10.74 GB / 22.95 GB
  Binaries:
    Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - ~\scoop\apps\yarn\current\Yarn\bin\yarn.CMD
    npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 92.0.4515.159
    Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.84)
    Internet Explorer: 11.0.19041.906

Used Package Manager

yarn

Logs

No response

Validations

@Shinigami92 Shinigami92 added the documentation Improvements or additions to documentation label Aug 30, 2021
@lovetingyuan
Copy link

What if I do want to replace process.env.NODE_ENV, such as using lib build mode. @patak-js

@github-actions github-actions bot locked and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation pending triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants