mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Fix theme-related Vite errors even when theme_tokens feature flag is disabled (#36936)
This commit is contained in:
@@ -40,13 +40,15 @@ export function MastodonThemes(): Plugin {
|
||||
|
||||
// Get all files mentioned in the themes.yml file.
|
||||
const themes = await loadThemesFromConfig(projectRoot);
|
||||
const allThemes = {
|
||||
...themes,
|
||||
default_theme_tokens: 'styles_new/application.scss',
|
||||
'mastodon-light_theme_tokens': 'styles_new/mastodon-light.scss',
|
||||
contrast_theme_tokens: 'styles_new/contrast.scss',
|
||||
};
|
||||
|
||||
for (const [themeName, themePath] of Object.entries(themes)) {
|
||||
for (const [themeName, themePath] of Object.entries(allThemes)) {
|
||||
entrypoints[`themes/${themeName}`] = path.resolve(jsRoot, themePath);
|
||||
entrypoints[`themes/${themeName}_theme_tokens`] = path.resolve(
|
||||
jsRoot,
|
||||
themePath.replace('styles/', 'styles_new/'),
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user