How do you not generate plasmic-host.html in Next.js?

@chungwu How do you not generate plasmic-host.html when you generate the static site in let’s say Next.js?

A way to hide pages in nextjs is to emit a 404 as shown in the bottom of this discussion

Why would you include plasmic-host in the production build in the first place? It’s not supposed to be part of the static site.

It is - it’s normally part of the production build because that’s the only way to ensure your Plasmic project is accessible

Not sure what you mean distinguishing production build vs static site - it should normally be in both the production build and development build of the static site

If you had a way to set an environment variable to remove plasmic-host from the build this would make sense.

However, every single website build on plasmic has a route /plasmic-host included in their static which not only you can navigate to, but will be part of the SEO for the site.

We have to manually remove it in our webpack config.

Normally, if you remove plasmic-host, then you won’t be able to access your project

So it does need to be available, typically on the production site

For SEO, you can block it in your robots.txt