Hi guys, Im having problem to create a staging folder,
My plan is:
My goal is, when the project is still building it should be is working, then when the building proccess is done, I want to replace the old .nuxt with newly created one, which is I named it .nuxt.stage
This is my solution for too long build process, When I build the project, upon building it will display Chunk XX or something, at that time, the site is unavailable,
I tried buildDir on nuxt.config.js but this is not a good a choice, cause it will record the manifest file which links and responsible of linking all files to the .nuxt files
What might be the best solution on this?
Updates:
As I notice, if .nuxt folder exists then building with .nuxt.stage the server will still stop, instead it will redirected to .nuxt.stage instead of the previous .nuxt, which is should stay on .nuxt
@alfligno Personally I would not recommend building-in-place on a live production server - and definitely not in the same directory. I would suggest you build in a separate directory or (preferably) on a separate server and then move the built artifacts.
@alfligno Personally I would not recommend building-in-place on a live production server - and definitely not in the same directory. I would suggest you build in a separate directory or (preferably) on a separate server and then move the built artifacts.
I did try building the project by using buildDir: "../.nuxt.stage" on nuxt.config.js but when I run the server which is npm run start it points out to the new build file which is .nuxt.stage instead of the old version which is located at the root directory or should I say the .nuxt
Did I miss something? :)
@alfligno I meant, clone your source in a new directory and build there. Still, I'd advise against doing so on a production server.
Thanks for the response, but, that would be alot of work, also a waste of space,
Thanks for the advice 馃憤
Most helpful comment
@alfligno Personally I would not recommend building-in-place on a live production server - and definitely not in the same directory. I would suggest you build in a separate directory or (preferably) on a separate server and then move the built artifacts.