Static GitHub Issues

[2271] router.base not maintained in build (without config file)

prev: nuxt generate是否适用vue1.0项目
next: How does the 'generate' work with middleware ?

There are cases where thenuxt.config.js file is required for a deployment, not just the .nuxt folder.

We had, in addition to the node_modules production dependencies, only the .nuxt folder copied into our runtime docker container.

With the addition of

  router: { base: '/app/' }

we found that we also needed the nuxt.config.js or the files are served from / (but scripts would fail to load because the tags in the html try to load them from /app/...

Suggest keeping additional data such as router.base in the .nuxt output folder. (and/or update the documentation with guidance about keeping nuxt.config.js in production deployment packages).

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1989">#c1989</a>)</em></sub></div>