You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
506 B
19 lines
506 B
/**
|
|
* Vite plugin for website theme color switching
|
|
* https://github.com/anncwb/vite-plugin-theme
|
|
*/
|
|
import { viteThemePlugin, mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme';
|
|
import { getThemeColors, generateColors } from '../../config/themeConfig';
|
|
|
|
export function configThemePlugin() {
|
|
const colors = generateColors({
|
|
mixDarken,
|
|
mixLighten,
|
|
tinycolor,
|
|
});
|
|
|
|
const plugin = viteThemePlugin({
|
|
colorVariables: [...getThemeColors(), ...colors],
|
|
});
|
|
return plugin;
|
|
}
|
|
|