unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.89k stars 280 forks source link

[Bug]: CLI adds a double set of quotes when you add components without using css vars. #98

Closed daver987 closed 1 year ago

daver987 commented 1 year ago

Environment

Developement/Production OS: Mac OS 13.6
Node version: 18.18.0
Package manager: pnpm@8.8.0
Radix Vue version: 0.4.1
Shadcn Vue version: 0.3.2
Nuxt version: 3.7.4
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss@3.3.3

Link to minimal reproduction

The CLI wont install on code sandbox

Steps to reproduce

Add shadcn-vue to Nuxt 3 via CLI without using css variables for styling.

Describe the bug

When I add shadcn-vue to a Nuxt 3 project without using the css variables for styling it double quotes all of the imports. it does a double quote " followed by a single quote ' the imports are not recoginized by the editor or nuxt. It also ignores whatever is in the components json file for the import alias

import { SelectItemText, type SelectItemTextProps } from "'radix-vue'" import { ChevronDownIcon } from "'@radix-icons/vue'"

Here is what it does with component creation

Expected behavior

To follow the components.json config and to not double quote where it should have a single quote.

Conext & Screenshots (if applicable)

Here is the config setup

Screenshot 2023-10-02 at 5 45 59 PM Screenshot 2023-10-02 at 5 44 58 PM
sidis405 commented 1 year ago

@daver987 came here to bring up the same issue

beejaz commented 1 year ago

Linking with issue #74