Files
moeka-project/packages/i18n/tsdown.config.ts
T
Neko eb6bcaed60 feat(i18n): new package for locales (#249)
* 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
2025-06-30 18:48:23 +08:00

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(),
],
})