create-tsrouter-app 0.6.8 → 0.6.9

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.
@@ -251,7 +251,10 @@ export async function createApp(options, { silent = false, environment, }) {
251
251
  if (!options.tailwind) {
252
252
  await copyFiles(templateDirBase, ['./src/App.css']);
253
253
  }
254
- await templateFile(templateDirBase, './vite.config.js.ejs');
254
+ // Don't create a vite.config.js file if we are building a Start app
255
+ if (!isAddOnEnabled('start')) {
256
+ await templateFile(templateDirBase, './vite.config.js.ejs');
257
+ }
255
258
  await templateFile(templateDirBase, './src/styles.css.ejs');
256
259
  copyFiles(templateDirBase, ['./src/logo.svg']);
257
260
  if (options.toolchain === 'biome') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tsrouter-app",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
4
4
  "description": "Tanstack Application Builder",
5
5
  "bin": "./dist/index.js",
6
6
  "type": "module",
package/src/create-app.ts CHANGED
@@ -385,7 +385,12 @@ export async function createApp(
385
385
  if (!options.tailwind) {
386
386
  await copyFiles(templateDirBase, ['./src/App.css'])
387
387
  }
388
- await templateFile(templateDirBase, './vite.config.js.ejs')
388
+
389
+ // Don't create a vite.config.js file if we are building a Start app
390
+ if (!isAddOnEnabled('start')) {
391
+ await templateFile(templateDirBase, './vite.config.js.ejs')
392
+ }
393
+
389
394
  await templateFile(templateDirBase, './src/styles.css.ejs')
390
395
 
391
396
  copyFiles(templateDirBase, ['./src/logo.svg'])
@@ -1,5 +1,7 @@
1
1
  import { defineConfig } from '@tanstack/react-start/config'
2
- import viteTsConfigPaths from 'vite-tsconfig-paths'
2
+ import viteTsConfigPaths from 'vite-tsconfig-paths'<% if (tailwind) { %>
3
+ import tailwindcss from "@tailwindcss/vite"
4
+ <% } %>
3
5
 
4
6
  export default defineConfig({
5
7
  tsr: {
@@ -11,6 +13,7 @@ export default defineConfig({
11
13
  viteTsConfigPaths({
12
14
  projects: ['./tsconfig.json'],
13
15
  }),
16
+ <% if (tailwind) { %>tailwindcss(),<% } %>
14
17
  ],
15
18
  },
16
19
  })
@@ -3,7 +3,7 @@ import viteReact from "@vitejs/plugin-react";<% if (tailwind) { %>
3
3
  import tailwindcss from "@tailwindcss/vite";
4
4
  <% } %><%if (fileRouter) { %>
5
5
  import { TanStackRouterVite } from "@tanstack/router-plugin/vite";<% } %><% if (addOnEnabled['module-federation']) { %>
6
- import {federation} from "@module-federation/vite";<% } %><% if (addOnEnabled.shadcn) { %>
6
+ import { federation } from "@module-federation/vite";<% } %><% if (addOnEnabled.shadcn) { %>
7
7
  import { resolve } from "node:path";<% } %><% if (addOnEnabled['module-federation']) { %>
8
8
  import federationConfig from "./module-federation.config.js";
9
9
  <% } %>
@@ -132,7 +132,7 @@ Here is an example layout that includes a header:
132
132
 
133
133
  ```tsx
134
134
  import { Outlet, createRootRoute } from '@tanstack/solid-router'
135
- import { TanStackRouterDevtools } from '@tanstack/router-devtools'
135
+ import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
136
136
 
137
137
  import { Link } from "@tanstack/solid-router";
138
138
 
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@tanstack/solid-router": "^1.110.0",
13
- "@tanstack/router-devtools": "^1.109.2",
13
+ "@tanstack/solid-router-devtools": "^1.109.2",
14
14
  "@tanstack/router-plugin": "^1.109.2",
15
15
  "solid-js": "^1.9.4"
16
16
  },
@@ -5,7 +5,7 @@ import {
5
5
  createRoute,
6
6
  createRouter,
7
7
  } from "@tanstack/solid-router";
8
- // import { TanStackRouterDevtools } from "@tanstack/router-devtools";
8
+ import { TanStackRouterDevtools } from "@tanstack/solid-router-devtools";
9
9
  import { render } from 'solid-js/web'
10
10
  <% for(const route of routes) { %>import <%= route.name %> from "<%= route.path %>";
11
11
  <% } %><% if (routes.length > 0) { %>
@@ -26,7 +26,7 @@ const rootRoute = createRootRoute({
26
26
  <% } %>
27
27
  <% if (routes.length > 0) { %><Header /><% } %>
28
28
  <Outlet />
29
- {/* <TanStackRouterDevtools /> */}
29
+ <TanStackRouterDevtools />
30
30
  <% for(const integration of integrations.filter(i => i.type === 'layout')) { %>
31
31
  <<%= integration.name %> />
32
32
  <% } %>
@@ -1,5 +1,5 @@
1
1
  import { Outlet, createRootRouteWithContext } from '@tanstack/solid-router'
2
- // import { TanStackRouterDevtools } from '@tanstack/router-devtools'<% for(const integration of integrations.filter(i => i.type === 'layout' || i.type === 'provider')) { %>
2
+ import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'<% for(const integration of integrations.filter(i => i.type === 'layout' || i.type === 'provider')) { %>
3
3
  import <%= integration.name %> from "../<%= integration.path %>";
4
4
  <% } %>
5
5
  <% if (addOnEnabled['solid-ui']) { %>