pickstack

SolidJS + Turborepo

Monorepo: the app in apps/web, tasks cached by turbo. This page shows exactly what pickstack adds to a SolidJS project for Turborepo: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework solid --modules turborepo --yes
Customize in the configurator

Packages it adds

PackageVersionType
turbo^2.11.13dev

New files

apps/web/.gitignore
node_modules
dist
.env
.env.local
.DS_Store
apps/web/index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>my-app</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/index.tsx"></script>
  </body>
</html>
apps/web/package.json
{
  "name": "web",
  "private": true,
  "version": "0.1.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "preview": "vite preview",
    "typecheck": "tsc -b"
  },
  "dependencies": {
    "solid-js": "^1.9.20"
  },
  "devDependencies": {
    "@types/node": "^24.19.2",
    "typescript": "~6.0.3",
    "vite": "^8.3.8",
    "vite-plugin-solid": "^2.11.17"
  }
}
apps/web/src/App.tsx
import Counter from "./components/Counter";

export default function App() {
  return (
    <main class="app">
      <h1 class="title">my-app</h1>
      <Counter />
    </main>
  );
}
apps/web/src/components/Counter.tsx
import { createSignal } from "solid-js";

export default function Counter() {
  const [count, setCount] = createSignal(0);

  return (
    <div class="card">
      <p class="count">{count()}</p>
      <div class="row">
        <button
          type="button"
          class="btn"
          onClick={() => setCount((value) => value - 1)}
        >
          -1
        </button>
        <button
          type="button"
          class="btn"
          onClick={() => setCount((value) => value + 1)}
        >
          +1
        </button>
      </div>
    </div>
  );
}
apps/web/src/index.css
:root {
  font-family: system-ui, sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

body {
  margin: 0;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  box-sizing: border-box;
}

.title {
  font-size: 1.875rem;
  margin: 0;
}

.nav {
  display: flex;
  gap: 1rem;
}

.link {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  color: #0f172a;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.text {
  max-width: 28rem;
  text-align: center;
  color: #475569;
}

.card {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.count {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.row {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  background: #0f172a;
  color: #fff;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
}

.btn:hover {
  background: #334155;
}
apps/web/src/index.tsx
/* @refresh reload */
import { render } from "solid-js/web";
import App from "./App";
import "./index.css";

const root = document.getElementById("root");

render(() => <App />, root!);
apps/web/tsconfig.app.json
{
  "compilerOptions": {
    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
    "target": "es2023",
    "module": "esnext",
    "lib": ["ES2023", "DOM"],
    "types": ["vite/client"],
    "allowArbitraryExtensions": true,
    "skipLibCheck": true,
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "moduleDetection": "force",
    "noEmit": true,
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "erasableSyntaxOnly": true,
    "noFallthroughCasesInSwitch": true
  },
  "include": ["src"]
}
apps/web/tsconfig.json
{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.node.json"
    }
  ]
}
apps/web/tsconfig.node.json
{
  "compilerOptions": {
    "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
    "target": "es2023",
    "lib": ["ES2023"],
    "types": ["node"],
    "skipLibCheck": true,
    "module": "nodenext",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "moduleDetection": "force",
    "noEmit": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "erasableSyntaxOnly": true,
    "noFallthroughCasesInSwitch": true
  },
  "include": ["vite.config.ts"]
}
apps/web/vite.config.ts
import { defineConfig } from "vite";
import solid from "vite-plugin-solid";

export default defineConfig({
  plugins: [solid()],
});
turbo.json
{
  "$schema": "https://turborepo.dev/schema.json",
  "ui": "tui",
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "inputs": ["$TURBO_DEFAULT$", ".env*"],
      "outputs": ["dist/**"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    },
    "typecheck": {
      "dependsOn": ["^typecheck"]
    }
  }
}

Changes to existing files

.gitignore (changed)
 node_modules+.turbo−dist .env .env.local .DS_Store⋯ 1 unchanged lines

Project files

Related templates