Closed CosmeValera closed 1 month ago
@ScriptedAlchemy
It does shows as if this is a bug but I believe it is not.
Not sure about other frameworks but React conduct additional checks when NODE_ENV=development
and setting it to NODE_ENV=production
will improve performance.
🐛 Problem
While using the Rspack version with any of the languages, when I try to execute
npm start
the following problem arises:🧠 Thought process
This is a real life example of the error showed above:
package.json
:However if I remove the
NODE_ENV
part in the start script this error does not appear anymore:There is a configuration error, but the project is correctly displayed in the browser:
🤠 Solution
I don't know much about Rspack, however my instant suggestion would be to simply remove the
NODE_ENV=development
andNODE_ENV=production
from the scripts, so it at least works out of the box. However, it would be very helpful if someone that knew a bit about rspack could guide a little in this topic about what the correct approach for this would be. 💓💓