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

Production build fails but dev works #1444

Closed
rolandjitsu opened this issue Oct 12, 2019 · 4 comments
Closed

Production build fails but dev works #1444

rolandjitsu opened this issue Oct 12, 2019 · 4 comments

Comments

@rolandjitsu
Copy link

Current behavior

If I build a production build w/ styleguidist build it will fail w/ the following error:

bundle.d11af456.js:12 Uncaught TypeError: Cannot read property 'F' of undefined
    at f (bundle.d11af456.js:12)
    at Object.<anonymous> (bundle.d11af456.js:12)
    at n (bundle.d11af456.js:12)
    at Object.<anonymous> (bundle.d11af456.js:12)
    at n (bundle.d11af456.js:12)
    at Object.<anonymous> (bundle.d11af456.js:12)
    at n (bundle.d11af456.js:12)
    at bundle.d11af456.js:12
    at Object.<anonymous> (bundle.d11af456.js:12)
    at __webpack_require__ (bundle.d11af456.js:1)

To reproduce

  1. Fork the repository: https://github.com/rolandjitsu/react-dropzone
  2. Install deps w/ yarn install
  3. Run the build w/ yarn styleguide
  4. Open the result in a browser (build output should be in the project root ./styleguide)

Expected behavior

Production build should work.

@oterral
Copy link
Contributor

oterral commented Oct 15, 2019

@rolandjitsu if it can helps . In our project, we fixed it fixing the terser version in package.json

  "resolutions": {
    "terser": "4.3.4"
  },

resolutions works with yarn but there should be an equivalent for npm I guess

@kopax
Copy link
Collaborator

kopax commented Oct 15, 2019

Related webpack-contrib/terser-webpack-plugin#173 terser/terser#490

I have added an option to disable minify, I will try to release asap

@fabiosantoscode
Copy link

Very cool :) I've just fixed the issue on my end.

I would greatly appreciate if you opened up the Terser options for your users to change, as they will be armed with the required tools to post nice bug reports :)

@kopax
Copy link
Collaborator

kopax commented Oct 15, 2019

It's done already @fabiosantoscode #1443

@sapegin sapegin closed this as completed Oct 30, 2019
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

5 participants