skip to Main Content

Sorry, don’t have a fiddle, but: I have a React application with Three.js where the zoom functionality is much poorer on my deployed site compared to when it’s running on localhost during development. It’s deployed on https://svo.utenforuio.no, but note that this is a test deployment which might be buggy at times.

Isn’t it supposed to be the same code, just minified? I’ve googled a million ways, but no answer…

I’m developing a threejs + mobx + threejs application showing Solar observations on a globe using data from a backend.

2

Answers


  1. Chosen as BEST ANSWER

    Found it! The "browserslist" settings in package.json were different for development vs production, so the production deployment was crating more inefficient code than what was used in the development (localhost) situation.

    Tuning the browserslist settings (and making them identical) solved my problem:

      "browserslist": {
        "production": [
          ">0.5% and not dead, last 5 chrome versions, last 5 firefox versions, last 5 safari versions, last 5 edge versions"    
        ],
        "development": [
          ">0.5% and not dead, last 5 chrome versions, last 5 firefox versions, last 5 safari versions, last 5 edge versions"    
        ]
      }
    

  2. Are you using Nextjs or Remix? If you’re rendering React on the server, it might just be that your computer has better specs than the server you’re deploying to

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search