I am deploying to a service that works by running nuxt build
in a /tmp
folder and then moves the project to a new location for hosting. This previously worked when using 0.9.X
, but no longer works with Nuxt 0.10.X
.
This broke because Nuxt started using vue-ssr-webpack-plugin
, which by default sets basedir to an absolute path generated at build time. This path is no longer valid at runtime since my deployment system will move the project.
This property can be overridden at runtime using basedir option, but Nuxt does not provide a hook into these options.
I've been considering a few options and would like to get your opinion.
vue-ssr-webpack-plugin
? This was a recent change and I don't understand the motivation.createBundleRenderer
such as baseurl
?In the short term I believe I can hack around this by running an additional build script after nuxt build
that simply removes the basedir
line from server-bundle.json
. The defaults used by createBundleRenderer
seem fine for my use case.
I don't think this type of deployment system where the build is run in 1 location and then the project is copied is that uncommon, so others may run into this issue after upgrading.
Thank you!
<!--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/c396">#c396</a>)</em></sub></div>