* feat(i18n): new package for locales We are renaming from zh-CN to zh-Hans with the naming regulation of BCP 47 language tags. For future languages, suggesting to check & lookup on - [Language subtag lookup app](https://r12a.github.io/app-subtags/) - [iana.org/assignments/language-subtag-registry/language-subtag-registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to search on. Additionally, use `en` for English is actually enforced instead of having `en-Latin`. More resources and citations worth to check on: - https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag - https://en.wikipedia.org/wiki/IETF_language_tag - https://en.wikipedia.org/wiki/ISO_15924
21 lines
453 B
TypeScript
21 lines
453 B
TypeScript
import Yaml from 'unplugin-yaml/rolldown'
|
|
|
|
import { defineConfig } from 'tsdown'
|
|
|
|
export default defineConfig({
|
|
entry: {
|
|
'index': 'src/index.ts',
|
|
'locales/index': 'src/locales/index.ts',
|
|
'locales/en/index': 'src/locales/en/index.ts',
|
|
'locales/zh-Hans/index': 'src/locales/zh-Hans/index.ts',
|
|
},
|
|
copy: [
|
|
{ from: 'src/locales', to: 'dist/locales' },
|
|
],
|
|
unbundle: true,
|
|
fixedExtension: true,
|
|
plugins: [
|
|
Yaml(),
|
|
],
|
|
})
|