create-react-app minify step of build is causing errors at run time
- Lingua principale
- JavaScript
- Stelle
- 15.5k
- Fork
- 663
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## *What* is wrong?
Code which is working in an un-minified development environment is crashing after creating a build via create-react-app, where the code has been minified and uglified
## *Where* does it happen?
gpu.js 2.10.4
The code which I create inside of the gpu.createKernel function
## *How* do we replicate the issue?
### Download source code
- git clone https://github.com/RossKinsella/gpujs-crash
### See it working in dev environment
- yarn start
- open localhost:3000
- open your browser console
- click the button, you will see the expected output in the console
### See it breaking in a build
- yarn build
- yarn global add serve
- serve -s build
- open localhost:5000
- open your browser console
- click the button, you will see the following error in the console:
```
2.dbc4db3a.chunk.js:2 Uncaught Error: Error compiling fragment shader: ERROR: 0:471: 'assign' : cannot convert from 'bool' to 'lowp float'
ERROR: 0:471: '&&' : wrong operand types - no operation '&&' exists that takes a left-hand operand of type 'lowp float' and a right operand of type 'bool' (or there is no acceptable conversion)
ERROR: 0:484: '&&' : wrong operand types - no operation '&&' exists that takes a left-hand operand of type 'bool' and a right operand of type 'lowp 2-component vector of float' (or there is no acceptable conversion)
```
## *How* important is this (1-5)?
5
## Expected behavior (i.e. solution)
For the build step to not break the code
## Other Comments
Thanks for your hard work on this project.
I spent a few hours looking over the other issues related to minify problems, I think I am running into some other edge case here.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Clona la riproduzione collegata di gpujs-crash e confronta yarn start con yarn build seguito da serve -s build. Inizia dal percorso del codice di gpu.createKernel e dagli errori del fragment shader generati nella console del browser. Il lavoro è completato quando la build di produzione esegue lo stesso kernel e produce l'output previsto senza errori di compilazione dello shader.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- build-system, computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100