shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
74.63k stars 4.64k forks source link

[bug]: `init`/`add` commands break `tailwind.config.js` #5734

Open lacy-rvo opened 1 week ago

lacy-rvo commented 1 week ago

Describe the bug

      fontFamily: {
        sans: [
          'Work Sans',
          'sans-serif',
          'Calibri',
          'Candara',
          'Segoe',
          'Segoe UI',
          'Optima',
          'Arial',
        ],
      },

Becomes

        fontFamily: {
            sans: [\n          'Work Sans',\n          'sans-serif',\n          'Calibri',\n          'Candara',\n          'Segoe',\n          'Segoe UI',\n          'Optima',\n          'Arial',\n        ]
        },

Affected component/components

CLI

How to reproduce

Have multiple lines in your tw config and use the CLI

      fontFamily: {
        sans: [
          // This breaks
          'Work Sans',
        ],
      },
      fontFamily: {
        sans: [
          'Work Sans',
          'Or this',
        ],
      },

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

next 14/15

Before submitting

typeofweb commented 1 day ago

I'm also experiencing the same problem but it goes even deeper than this: