mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-24 23:29:30 -05:00
Fix theme-related Vite errors even when theme_tokens feature flag is disabled (#36936)
This commit is contained in:
parent
4d0aab4a31
commit
366856f3bc
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user