theme.ts 402 B

123456789101112131415
  1. import { viteThemePlugin, mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme';
  2. import { getThemeColors, generateColors } from '../../config/themeConfig';
  3. export function configThemePlugin() {
  4. const colors = generateColors({
  5. mixDarken,
  6. mixLighten,
  7. tinycolor,
  8. });
  9. const plugin = viteThemePlugin({
  10. colorVariables: [...getThemeColors(), ...colors],
  11. });
  12. return plugin;
  13. }