@@ -5,7 +5,6 @@ import { getParameters } from 'codesandbox/lib/api/define'
5
5
import cssRaw from '../../../../../packages/cli/test/fixtures/frameworks/nuxt/assets/css/tailwind.css?raw'
6
6
import { Index as demoIndex } from '../../../../www/__registry__'
7
7
// @ts -expect-error ?raw
8
- import tailwindConfigRaw from '../../../tailwind.config?raw'
9
8
10
9
export function makeCodeSandboxParams ( componentName : string , style : RegistryStyle , sources : Record < string , string > ) {
11
10
let files : Record < string , any > = { }
@@ -39,17 +38,11 @@ const viteConfig = {
39
38
content : `import path from "path"
40
39
import { defineConfig } from 'vite'
41
40
import vue from '@vitejs/plugin-vue'
41
+ import tailwindcss from '@tailwindcss/vite'
42
42
43
- import tailwind from 'tailwindcss';
44
- import autoprefixer from 'autoprefixer';
45
43
46
44
export default defineConfig({
47
- css: {
48
- postcss: {
49
- plugins: [tailwind(), autoprefixer()],
50
- },
51
- },
52
- plugins: [vue()],
45
+ plugins: [vue(), tailwindcss()],
53
46
resolve: {
54
47
alias: {
55
48
"@": path.resolve(__dirname, "./src"),
@@ -79,16 +72,22 @@ export default defineConfig({
79
72
80
73
function constructFiles ( componentName : string , style : RegistryStyle , sources : Record < string , string > ) {
81
74
const componentsJson = {
82
- style,
75
+ $schema : 'https://shadcn-vue.com/schema.json' ,
76
+ style : 'new-york' ,
77
+ typescript : true ,
83
78
tailwind : {
84
- config : 'tailwind.config.js ' ,
79
+ config : '' ,
85
80
css : 'src/assets/index.css' ,
86
81
baseColor : 'zinc' ,
87
82
cssVariables : true ,
83
+ prefix : '' ,
88
84
} ,
89
85
aliases : {
90
- utils : '@/utils' ,
91
86
components : '@/components' ,
87
+ composables : '@/composables' ,
88
+ utils : '@/lib/utils' ,
89
+ ui : '@/components/ui' ,
90
+ lib : '@/lib' ,
92
91
} ,
93
92
iconLibrary : 'lucide' ,
94
93
}
@@ -114,7 +113,8 @@ function constructFiles(componentName: string, style: RegistryStyle, sources: Re
114
113
'vite' : 'latest' ,
115
114
'@vitejs/plugin-vue' : 'latest' ,
116
115
'vue-tsc' : 'latest' ,
117
- 'tailwindcss' : 'v3.4.13' ,
116
+ 'tailwindcss' : 'latest' ,
117
+ '@tailwindcss/vite' : 'latest' ,
118
118
'autoprefixer' : 'latest' ,
119
119
}
120
120
@@ -153,10 +153,6 @@ function constructFiles(componentName: string, style: RegistryStyle, sources: Re
153
153
isBinary : false ,
154
154
} ,
155
155
...viteConfig ,
156
- 'tailwind.config.js' : {
157
- content : tailwindConfigRaw ,
158
- isBinary : false ,
159
- } ,
160
156
'tsconfig.json' : {
161
157
content : `{
162
158
"$schema": "https://json.schemastore.org/tsconfig",
0 commit comments