-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[5.15.3] Error "process is not defined" in production if node
is set to false
in webpack config
#2264
Comments
should be be prefixed with a `typeof process !== "undefined"` indeed... I
think we should accepting these 'lets change MobX because it doesn't play
nicely with my specific setup' PRs..... :-/
…On Mon, Jan 27, 2020 at 10:38 AM le0nik ***@***.***> wrote:
If webpack doesn't mock process then it only replaces exact strings
defined in DefinePlugin or EnvironmentPlugin etc, so
process.env.IGNORE_MOBX_MINIFY_WARNING doesn't get replaced and causes a
"process is not defined" error in production. This is the offending line.
https://github.com/mobxjs/mobx/blob/d5488a180a34701ed90c4a25ccecef3619a42ea8/src/v5/mobx.ts#L43
Workarounds for now are:
- roll back to 5.15.2
- add IGNORE_MOBX_MINIFY_WARNING to Define/Environment plugin in
webpack config
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2264?email_source=notifications&email_token=AAN4NBBSCWGVQOHST7O4TKTQ722RLA5CNFSM4KL67G62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4II4CECQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBCCK7MB3BD6VWKF7GLQ722RLANCNFSM4KL67G6Q>
.
|
4 tasks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If webpack doesn't mock
process
then it only replaces exact strings defined inDefinePlugin
orEnvironmentPlugin
etc, soprocess.env.IGNORE_MOBX_MINIFY_WARNING
doesn't get replaced and causes a "process is not defined" error in production. This is the offending line.mobx/src/v5/mobx.ts
Line 43 in d5488a1
Workarounds on user's side for now are:
IGNORE_MOBX_MINIFY_WARNING
to Define/Environment plugin in webpack configThe text was updated successfully, but these errors were encountered: