@lazarv/create-react-server 0.0.0-experimental-989cf02-20250217-d62ba1cb → 0.0.0-experimental-f35c661-20250227-d31930e2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/globals.d.ts CHANGED
@@ -57,3 +57,7 @@ declare module "lightningcss" {
57
57
  browsers: string[]
58
58
  ): Record<string, string>;
59
59
  }
60
+
61
+ declare module "@tailwindcss/vite" {
62
+ export default function tailwindcssVitePlugin(): VitePlugin;
63
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazarv/create-react-server",
3
- "version": "0.0.0-experimental-989cf02-20250217-d62ba1cb",
3
+ "version": "0.0.0-experimental-f35c661-20250227-d31930e2",
4
4
  "bin": {
5
5
  "create-react-server": "index.mjs"
6
6
  },
@@ -39,7 +39,7 @@
39
39
  "picocolors": "^1.1.1",
40
40
  "prettier": "^3.0.0",
41
41
  "ts-morph": "^24.0.0",
42
- "@lazarv/react-server": "0.0.0-experimental-d24f1e6-20250215-2e3908d4"
42
+ "@lazarv/react-server": "0.0.0-experimental-be787f2-20250217-12688b9b"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=20.10.0"
@@ -30,11 +30,18 @@ export default async (context) => {
30
30
  checked: context.props.preset?.features.includes("prettier"),
31
31
  },
32
32
  {
33
- name: "Tailwind CSS",
33
+ name: "Tailwind CSS v3",
34
34
  value: "tailwind",
35
- description: "Add Tailwind CSS support",
35
+ description:
36
+ "Add Tailwind CSS v3 support (using PostCSS and Autoprefixer)",
36
37
  checked: context.props.preset?.features.includes("tailwind"),
37
38
  },
39
+ {
40
+ name: "Tailwind CSS v4",
41
+ value: "tailwind-v4",
42
+ description: "Add Tailwind CSS support (using the official Vite plugin)",
43
+ checked: context.props.preset?.features.includes("tailwind-v4"),
44
+ },
38
45
  {
39
46
  name: "Lightning CSS",
40
47
  value: "lightningcss",
@@ -234,17 +241,63 @@ import tsParser from "@typescript-eslint/parser";`,
234
241
  }
235
242
 
236
243
  if (answer.includes("tailwind")) {
244
+ if (!answer.includes("tailwind-v4")) {
245
+ partials["package.json"] = {
246
+ ...partials["package.json"],
247
+ merge: [
248
+ ...partials["package.json"].merge,
249
+ await json(context.env.templateDir, "package.tailwind.json"),
250
+ ],
251
+ };
252
+ partials["src/global.css"] = {
253
+ content: `@tailwind base;
254
+ @tailwind components;
255
+ @tailwind utilities;`,
256
+ };
257
+ files.push(
258
+ join(context.env.templateDir, "tailwind.config.mjs"),
259
+ join(context.env.templateDir, "postcss.config.mjs")
260
+ );
261
+ } else {
262
+ context.env.logger.warn(
263
+ "You should not use different Tailwind CSS versions at the same time. Tailwind CSS v3 will not be installed."
264
+ );
265
+ }
266
+ }
267
+
268
+ if (answer.includes("tailwind-v4")) {
237
269
  partials["package.json"] = {
238
270
  ...partials["package.json"],
239
271
  merge: [
240
272
  ...partials["package.json"].merge,
241
- await json(context.env.templateDir, "package.tailwind.json"),
273
+ await json(context.env.templateDir, "package.tailwind-v4.json"),
242
274
  ],
243
275
  };
244
- files.push(
245
- join(context.env.templateDir, "tailwind.config.mjs"),
246
- join(context.env.templateDir, "postcss.config.mjs")
247
- );
276
+ partials["src/global.css"] = {
277
+ content: `@import "tailwindcss";`,
278
+ };
279
+ if (answer.includes("ts")) {
280
+ partials["vite.config.ts"] = {
281
+ ...partials["vite.config.ts"],
282
+ merge: [
283
+ await readFile(
284
+ join(context.env.templateDir, "vite.config.tailwind-v4.ts"),
285
+ "utf8"
286
+ ),
287
+ ],
288
+ };
289
+ } else {
290
+ partials["vite.config.mjs"] = {
291
+ ...partials["vite.config.mjs"],
292
+ type: "code",
293
+ merge: [
294
+ await readFile(
295
+ join(context.env.templateDir, "vite.config.tailwind-v4.mjs"),
296
+ "utf8"
297
+ ),
298
+ ],
299
+ };
300
+ }
248
301
  }
249
302
 
250
303
  if (answer.includes("css-modules")) {
@@ -0,0 +1,6 @@
1
+ {
2
+ "devDependencies": {
3
+ "@tailwindcss/vite": "^4.0.9",
4
+ "tailwindcss": "^4.0.9"
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ import tailwindcss from "@tailwindcss/vite";
2
+ import { defineConfig } from "vite";
3
+
4
+ export default defineConfig({
5
+ plugins: [tailwindcss()],
6
+ });
@@ -0,0 +1,6 @@
1
+ import tailwindcss from "@tailwindcss/vite";
2
+ import { defineConfig } from "vite";
3
+
4
+ export default defineConfig({
5
+ plugins: [tailwindcss()],
6
+ });