Production build no longer default?


#1

A couple months ago, a glitch project of mine to run both react and node worked, but now no longer works.

One piece of my express logic that no longer seems to work:

// Always return the main index.html, so react-router renders the route in the client
app.get('*', (req, res) => {
  res.sendFile(path.resolve(__dirname, '..', 'build', 'index.html'));
});

In the logs I see:

Note that the development build is not optimized.
To create a production build, use npm run build.

Is this a change? Did glitch previously make build/ directory, but now no longer does?

(I know I can do a build in console, I’m just asking if there’s a different default behavior now.)


#2

I don’t think we changed anything in that area. The message you see in the logs is just telling you that performance on the development version of React isn’t as good as the production build. That’s probably not related to the problem with the project.

What problem are you seeing with that route?


#3

The build/ directory used to be automatically available, but seems no longer to be. But possibly I had triggered a command that had started a build in the past.

If there were no changes on glitch’s end, then this can be closed. Thanks!


#4

Could you have been remixing a project that happened to have the build directory created? It was never a default folder that I recall.