VSCode react deployment uses development build rather than production

Tim Schönborn 11 Reputation points
2021-05-30T19:23:29.283+00:00

When I deploy my react app to Azure App Service (using the VSCode extension), the output window shows:

...
Running 'yarn run build'...
yarn run v1.22.10
$ react-scripts build
Creating an optimized production build...
Compiled successfully.
...
However, when I visit the app, the react browser extension warns me that the App is using a development build. Does anyone know what's going on here? Am I doing something wrong?

I used CRA to create the app and didn't change any config files.

Thanks!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,932 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Hi 1 Reputation point
    2021-10-06T19:27:00.31+00:00

    Hello! I am also having this problem with React app deployed to Azure App Service through the VSCode extension. I am never asked what directory I want to publish FROM like in the tutorial linked above (I believe this tutorial uses a previous VSCode extension version), and it says it is building the production mode of react in the output during the deployment, but when I go in to actually look at it, its in development mode.

    A react app site in development mode will look unprofessional and insecure to tech-savvy clients.

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.