Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async function createApp(projectName: string, options: Required<Options>) {

// Setup tsconfig
if (options.typescript) {
await copyFiles(templateDirBase, ['./tsconfig.json', './tsconfig.dev.json'])
await copyFiles(templateDirBase, ['./tsconfig.json'])
}

// Setup the package.json file, optionally with typescript and tailwind
Expand Down
4 changes: 2 additions & 2 deletions templates/base/README.md.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ With this set up you should be able to navigate to `/about` and see the about pa
Of course you don't need to implement the About page in the `main.<%= jsx %>` file. You can create that component in another file and import it into the `main.<%= jsx %>` file, then use it in the `component` property of the `createRoute` call, like so:

```tsx
import About from "./components/About";
import About from "./components/About.<%= jsx %>";

const aboutRoute = createRoute({
getParentRoute: () => rootRoute,
Expand Down Expand Up @@ -298,7 +298,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
import { routeTree } from "./routeTree.gen";

import "./styles.css";
import reportWebVitals from "./reportWebVitals";
import reportWebVitals from "./reportWebVitals.<%= js %>";

// Create a new router instance
const router = createRouter({ routeTree });
Expand Down
2 changes: 1 addition & 1 deletion templates/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"start": "vite --port 3000",
"build": "vite build && tsc --noEmit",
"build": "vite build && tsc",
"serve": "vite preview",
"test": "vitest run"
},
Expand Down
2 changes: 1 addition & 1 deletion templates/base/src/App.test.tsx.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest";
import { render, screen } from "@testing-library/react";
import App from "./App";
import App from "./App.<%= jsx %>";

describe("App", () => {
test("renders", () => {
Expand Down
10 changes: 0 additions & 10 deletions templates/base/tsconfig.dev.json

This file was deleted.

24 changes: 19 additions & 5 deletions templates/base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
{
"include": ["**/*.ts", "**/*.tsx"],
"compilerOptions": {
"strict": true,
"types": ["vite/client", "node"],
"esModuleInterop": true,
"target": "ES2022",
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"skipLibCheck": true
"module": "ESNext",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"types": ["vite/client"],

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,

/* Linting */
"skipLibCheck": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
}
}
4 changes: 2 additions & 2 deletions templates/code-router/src/main.tsx.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
import { TanStackRouterDevtools } from "@tanstack/router-devtools";

import "./styles.css";
import reportWebVitals from "./reportWebVitals";
import reportWebVitals from "./reportWebVitals.<%= js %>";

import App from "./App";
import App from "./App.<%= jsx %>";

const rootRoute = createRootRoute({
component: () => (
Expand Down
2 changes: 1 addition & 1 deletion templates/file-router/src/main.tsx.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RouterProvider, createRouter } from "@tanstack/react-router";
import { routeTree } from "./routeTree.gen";

import "./styles.css";
import reportWebVitals from "./reportWebVitals";
import reportWebVitals from "./reportWebVitals.<%= js %>";

// Create a new router instance
const router = createRouter({ routeTree });
Expand Down