Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Oct 22, 2024
1 parent 7729b3f commit e1a09ca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ outline: deep

One common issue when using `Nuxt I18n Micro` is that some routes might not open as expected. This can happen when the router doesn’t automatically assign a name to a route, particularly in subfolders.

### **Solution:**
**Solution:**
To fix this, manually define the page’s route name by adding the following to the corresponding Vue file:

```javascript
Expand All @@ -23,10 +23,9 @@ This ensures that the route is properly registered, and the application can navi

When deploying to platforms like Netlify, the build process might behave differently compared to local development. This can lead to issues where certain files or folders are not found during server-side rendering (SSR).

### **Solution:**
To ensure that localization files are available during SSR, the `assets/_locales/` folder is added to the server folder. This is a workaround to make sure that the localization files are accessible in the production environment, especially when the build process and runtime environment differ.

### **Explanation:**
**Explanation:**
- **Build Process:** During the build, all translations are cached in the production folder. However, when deploying to platforms like Netlify, the server code is moved to functions, and there might be a separate container where locale files are not accessible.
- **Prerendering:** Prerendering does not work when using `$fetch` in SSR, leading to middleware not finding the localization files.
- **Server Assets:** To address this, the localization files are saved in the Nitro server assets during prerendering. In production, they are read from the server assets.
Expand Down

0 comments on commit e1a09ca

Please sign in to comment.