How to optimize nuxt 2 rebuild then deploying the app? #26736
Unanswered
ivanushkaPr
asked this question in
Questions (Nuxt 2)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello community! I got a question to ask, we use i18n module with nuxt 2 bridge and was searching for implemented scenarios of 'Build once, deploy many' CI/CD best practices.
Unfortunately, there is no way to change default locale of i18n module without rebuild step, because it generates all routes and change this setting at buildTime, in the favor of speed optimization.
After that, i got another question, that came in my mind - how can we cache files from previous build, and use them in rebuild step, so we can optimize rebuild time of our app?
After googling, using phind and surfing across internet for days, the only created solution i found, was usage of cache option in nuxt2 config with terser and cache - loader.
But as far as i know, its not a best practice then we use build command and deploying our app, because it can lead to errors and bugs.
So my question is, that are the best practices to optimize build / rebuild time speed and do you know, there i can find working examples of this projects setups?
Unfortunately, i was not able to find any open source projects, with nuxt.config.js setup optimized for the goals i mentioned earlier.
Beta Was this translation helpful? Give feedback.
All reactions