Error: [BABEL] /xxx/repo/ccpaas_frontend/src/index.tsx: React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "production". If you want to override this check, pass {skipEnvCheck: true} as plugin options. (While processing: "/xxxe/repo/ccpaas_frontend/node_modules/react-refresh/babel.js")
You can also set the NODE_ENV to production to solve this build error.
If you are coming from create-react-app, the NODE_ENV is hard-coded for the react-scripts buildcommand whereas the craco buildcommand uses the user-defined NODE_ENV if possible.
Is that intended @dilanx ?
What's happening Running
craco build
fails withWhat should happen should not fail
To reproduce execute the build command
CRACO version 7.0.1
CRACO config
package.json
Additional information