Use vite to replace webpack

This commit is contained in:
tusooa 2025-02-28 10:52:04 -05:00
commit 25de264abb
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
51 changed files with 1210 additions and 79 deletions

View file

@ -179,9 +179,9 @@ const defaultState = {
}
const loadAnnotations = (lang) => {
const code = langCodeToCldrName(lang)
return import(
/* webpackChunkName: "emoji-annotations/[request]" */
`@kazvmoe-infra/unicode-emoji-json/annotations/${langCodeToCldrName(lang)}.json`
`../../node_modules/@kazvmoe-infra/unicode-emoji-json/annotations/${code}.json`
)
.then(k => k.default)
}
@ -304,7 +304,7 @@ const instance = {
},
async getStaticEmoji ({ commit }) {
try {
const values = (await import(/* webpackChunkName: 'emoji' */ '../../static/emoji.json')).default
const values = (await import('/src/assets/emoji.json')).default
const emoji = Object.keys(values).reduce((res, groupId) => {
res[groupId] = values[groupId].map(e => ({