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

[4.0.0-beta.3] Failed to minify the code #1379

Closed
heikkilamarko opened this issue Mar 8, 2018 · 3 comments
Closed

[4.0.0-beta.3] Failed to minify the code #1379

heikkilamarko opened this issue Mar 8, 2018 · 3 comments

Comments

@heikkilamarko
Copy link

I am using CRA (create-react-app) for my project. After migrating to 4.0.0-beta.3, the production build started to output the following error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

        ../node_modules/mobx/lib/mobx.module.js:4029

Read more here: http://bit.ly/2tRViJ9
@heikkilamarko
Copy link
Author

The error goes away if I comment out the following lines from mobx.module.js:

try {
    // define process.env if needed
    // if this is not a production build in the first place
    // (in which case the expression below would be substituted with 'production')
    process.env.NODE_ENV;
}
catch (e) {
    if (typeof process === "undefined")
        (typeof window !== "undefined" ? window : global).process = {};
    process.env = {};
}

@mweststrate
Copy link
Member

Should be addressed by mobx@4.0.0-beta.4. Please reopen if it isn't :)

@heikkilamarko
Copy link
Author

Beta 4 fixed the problem. Thanks for the quick response :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants