saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.11k stars 1.3k forks source link

vite + windiness configuration doesn't work (RangeError: Maximum call stack size exceeded) #382

Closed liorp closed 2 years ago

liorp commented 2 years ago

My vite.config.ts is

import { defineConfig } from 'vite'
import WindiCSS from 'vite-plugin-windicss'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({ plugins: [WindiCSS(), tsconfigPaths()] })

And windy.config.ts

import { defineConfig } from 'vite-plugin-windicss'
import { transform } from 'windicss/helpers'

export default defineConfig({
    darkMode: false,
    theme: {
        extend: {
            colors: require('daisyui/colors/windi'),
        },
    },
    extract: {
        include: ['index.html', 'src/**/*.{vue,html,jsx,tsx}'],
        exclude: ['node_modules/**/*', '.git/**/*'],
    },
    plugins: [transform('daisyui')],
})

When running vite serve, this results in

๐ŸŒผ daisyUI components 1.21.0  https://github.com/saadeghi/daisyui
  error when starting dev server:
  RangeError: Maximum call stack size exceeded
      at guessClassName
saadeghi commented 2 years ago

https://github.com/saadeghi/daisyui/issues/349#issuecomment-999218977
Please open an issue about this on windi repo.