Skip to content

Commit c7e64c6

Browse files
author
Guillaume Chau
committed
refactor(i19n): use vue-cli-locales
1 parent aca31eb commit c7e64c6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/@vue/cli-ui/src/i18n.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@ function detectLanguage () {
2323

2424
async function autoInstallLocale (lang) {
2525
try {
26-
let response = await fetch(`https://unpkg.com/vue-cli-locale-${lang}`)
26+
let response = await fetch(`https://unpkg.com/vue-cli-locales/locales/${lang}.json`)
2727
if (response.ok) {
28-
// Redirect
29-
const location = response.headers.get('location')
30-
if (location) {
31-
response = await fetch(`https://unpkg.com${location}`)
32-
}
3328
const data = await response.json()
3429
mergeLocale(lang, data)
3530
return true

0 commit comments

Comments
 (0)