Replace Ruby Vite plugins (#35195)

Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
Echo
2025-07-17 12:04:04 +02:00
committed by GitHub
parent 19626ad89f
commit 9e6a9efe10
6 changed files with 153 additions and 106 deletions

View File

@@ -22,7 +22,21 @@ export function MastodonThemes(): Plugin {
projectRoot = userConfig.envDir;
jsRoot = userConfig.root;
const entrypoints: Record<string, string> = {};
let entrypoints: Record<string, string> = {};
const existingInputs = userConfig.build?.rollupOptions?.input;
if (typeof existingInputs === 'string') {
entrypoints[path.basename(existingInputs)] = existingInputs;
} else if (Array.isArray(existingInputs)) {
for (const input of existingInputs) {
if (typeof input === 'string') {
entrypoints[path.basename(input)] = input;
}
}
} else if (typeof existingInputs === 'object') {
entrypoints = existingInputs;
}
// Get all files mentioned in the themes.yml file.
const themes = await loadThemesFromConfig(projectRoot);