Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daver987 opened this issue Oct 2, 2023 · 2 comments · Fixed by #129
Closed
Assignees
Labels
bug Something isn't working

Comments

@daver987
Copy link

daver987 commented Oct 2, 2023

Environment

Developement/Production OS: Mac OS 13.6
Node version: 18.18.0
Package manager: [email protected]
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: [email protected]

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

<script setup lang="ts"> import { cn } from "'@/lib/utils'" const props = defineProps({ class: { type: String, default: "''", }, }) </script>

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
@daver987 daver987 added the bug Something isn't working label Oct 2, 2023
@sidis405
Copy link

sidis405 commented Oct 3, 2023

@daver987 came here to bring up the same issue

@beejaz
Copy link
Contributor

beejaz commented Oct 3, 2023

Linking with issue #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants