Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

create-react-app minify step of build is causing errors at run time

オープン
#642 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, react

調査の方向性

リンクされている gpujs-crash の再現をクローンし、yarn start と yarn build に続く serve -s build を比較します。gpu.createKernel のコードパスと、ブラウザーコンソールに生成される fragment shader のエラーから調査を開始します。production build が同じ kernel を実行し、shader のコンパイルエラーなしに期待される出力を生成すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
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.

主要言語
JavaScript
スター
15.5k
フォーク
663
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

gpujs/gpu.js のほかの issue

gpujs/gpu.js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。