nuxt-i18n does not generate a file named index.html for non default locales
See original GitHub issueVersion
Reproduction link
N/A
Steps to reproduce
This is my nuxt-i18n
config:
['nuxt-i18n', {
locales: [
{ code: 'en', iso: 'en-US', name: 'English', file: 'en-US.js' },
{ code: 'ja', iso: 'ja', name: '日本人', file: 'ja.js' }
],
defaultLocale: 'en',
lazy: true,
langDir: 'locale/',
seo: false
}]
- run
nuxt generate
- look in the
/dist
folder under non-default locale - the file that should be
index.html
is called.html
(no name for the file)
What is expected ?
nuxt-i18n
needs to generate a file named index.html for each locale, just like it does for the default locale.
What is actually happening?
nuxt-i18n
generates a file named .html
and not index.html
, which interferes with site hosting like Netlify
which expect a file with that name.
Additional comments?
Is that the expected behavior or am I experiencing a bug?
<div align="right">This bug report is available on Nuxt community (#c211)</div>Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
nuxt-i18n does not generate a file named index.html for ...
run nuxt generate; look in the /dist folder under non-default locale; the file that should be index.html is called .html (no name for...
Read more >Nuxt generate don't generate route html file
In my case I have blog1 folder, inside index.vue file and all article.vue file, I used child route cause in this way I...
Read more >A Guide to Localizing with Nuxt.js
In this tutorial, we'll use a library called nuxt-i18n , based on vue-i18n , with some Nuxt-specific localization options.
Read more >API references | Vue I18n
The handler gets called with the localization target locale, localization path key, the Vue instance and values. If missing handler is assigned, ...
Read more >A simple multi-language site with Nuxt.js and nuxt-i18n
In this article, we will see how to create a simple multilanguage website using Nuxt.js and nuxt-i18n module. In this case, we have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I currently solved the issue by running a small renaming script after running
nuxt generate
:fix-index-locales.js
package.json
Hopefully it will help people who have the same issue…
Yup we use that.