Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Maximum call stack size exceeded #168

Closed
@edgarasben

Description

@edgarasben

What version of @tailwindcss/jit are you using?

v0.1.11 → (Updated: v0.1.12)

What version of Node.js are you using?

v14.15.1

What browser are you using?

Safari

What operating system are you using?

macOS

Reproduction repository

https://github.com/edgarasben/bulletproof-ui/blob/main/src/Button.jsx

I get an error only when I switch to '@tailwindcss/jit' PostCSS plugin and I am trying to build a conditional CSS classes with React + Vite.

The error occurs when I add this to the Button.jsx file:

  const types = {
    primary: 'bg-blue-600 hover:bg-blue-700 text-white',
    secondary:
      'bg-blue-700 text-blue-600 hover:bg-blue-700 bg-opacity-20 hover:bg-opacity-30',
  }
  const whichType = types[props.buttonType]

Error log

[plugin:vite:css] Maximum call stack size exceeded
/Users/edgaras/Documents/Sites/bulletproof-ui/src/index.css
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:19:32)
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10)
    at candidatePermutations.next (<anonymous>)
    at candidatePermutations (/Users/edgaras/Documents/Sites/bulletproof-ui/node_modules/@tailwindcss/jit/src/lib/generateRules.js:41:10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions