mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
[Glitch] Update dependency vite to v8
Port changes from 1935f4db79 to glitch-soc
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ChaosExAnima <ChaosExAnima@users.noreply.github.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
import { EMOJI_DB_NAME_SHORTCODES, EMOJI_TYPE_CUSTOM } from './constants';
|
import { EMOJI_DB_NAME_SHORTCODES, EMOJI_TYPE_CUSTOM } from './constants';
|
||||||
import {
|
|
||||||
importCustomEmojiData,
|
|
||||||
importEmojiData,
|
|
||||||
importLegacyShortcodes,
|
|
||||||
} from './loader';
|
|
||||||
|
|
||||||
addEventListener('message', handleMessage);
|
addEventListener('message', handleMessage);
|
||||||
self.postMessage('ready'); // After the worker is ready, notify the main thread
|
self.postMessage('ready'); // After the worker is ready, notify the main thread
|
||||||
@@ -16,6 +11,8 @@ function handleMessage(event: MessageEvent<{ locale: string }>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadData(locale: string) {
|
async function loadData(locale: string) {
|
||||||
|
const { importCustomEmojiData, importEmojiData, importLegacyShortcodes } =
|
||||||
|
await import('./loader');
|
||||||
let importCount: number | undefined;
|
let importCount: number | undefined;
|
||||||
if (locale === EMOJI_TYPE_CUSTOM) {
|
if (locale === EMOJI_TYPE_CUSTOM) {
|
||||||
importCount = (await importCustomEmojiData())?.length;
|
importCount = (await importCustomEmojiData())?.length;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function GlitchThemes(): Plugin {
|
|||||||
return {
|
return {
|
||||||
name: 'glitch-themes',
|
name: 'glitch-themes',
|
||||||
async config(userConfig) {
|
async config(userConfig) {
|
||||||
const existingInputs = userConfig.build?.rollupOptions?.input;
|
const existingInputs = userConfig.build?.rolldownOptions?.input;
|
||||||
|
|
||||||
if (typeof existingInputs === 'string') {
|
if (typeof existingInputs === 'string') {
|
||||||
entrypoints[path.basename(existingInputs)] = existingInputs;
|
entrypoints[path.basename(existingInputs)] = existingInputs;
|
||||||
@@ -79,7 +79,7 @@ export function GlitchThemes(): Plugin {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
input: entrypoints,
|
input: entrypoints,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user