Problem with production version (serve build)
See original GitHub issueBug reports:
I’m using the component from an application created using create-react-app, everything works fine as long as I do not build. When I execute:
npm run build
serve -s build
http://localhost:5000/
I see a blank page and this is what i see in console log:
Something strange seems to happen when I produce the minimized version. Has anyone already had a similar problem?
Please consider also to support this project https://beerpay.io/chrvadala/react-svg-pan-zoom
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
react-svg-pan-zoom: Problem with production version (serve ...
The post that solve the problem is on GitHub project page. The browser field in react-svg-pan-zoom's package.json is set to use the UMD ......
Read more >Making a production version - The Apache Software Foundation!
Making a production version. Releasing an application for consumers. The version in the js-debug folder is considered a “debug version” or “development ...
Read more >Production order - valid production version issue
our server is in Germany and I am in CST. ... I then created production version and the validity is from nov 19th...
Read more >Next.js CLI
The Next.js CLI allows you to start, build, and export your application. Learn more about it here.
Read more >Production | webpack
The goals of development and production builds differ greatly. In development, we want strong source mapping and a localhost server with live reloading...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The browser field in react-svg-pan-zoom’s package.json is set to use the UMD bundle. CRA’s build process (ala webpack) is using that field as a hint and end up pulling the UMD bundle to include in your final app build. I believe React only works with es6 classes. The quick-fix here is to change your import statements to explicitly use the ES bundle in this package. For e.g. change
import { UncontrolledReactSVGPanZoom } from 'react-svg-pan-zoom'
toimport { UncontrolledReactSVGPanZoom } from 'react-svg-pan-zoom/build-es'
I had this issue and upgrading to v3.1 fixed it BUT it broke the rest of my site layout 😄