Open-Source Wikis

/

Solid

/

Reference

/

Configuration

solidjs/solid

Configuration

Active contributors: Ryan Carniato

Every config file in the repository, what it controls, and where to look first when you need to change behaviour.

Repo-level

File Purpose
package.json Root manifest. Declares private: true, the pnpm package-manager pin, the simple-git-hooks pre-commit Prettier hook, the preinstall pnpm-only enforcement, and the top-level scripts (build, test, format, bump, publish).
pnpm-workspace.yaml Two-line file: packages: ['packages/*']. The single source of truth for the workspace.
pnpm-lock.yaml Generated. Do not hand-edit.
turbo.json Turborepo pipeline definitions. Specifies dependsOn graph for build, types, link, test, coverage, test-types.
tsconfig.json Root TypeScript config that other tsconfigs extend.
tsconfig.test.json Compile-only check for *.type-tests.ts files.
.prettierrc Prettier formatting rules.
.editorconfig Tab/space, line-ending, final-newline rules for editors.
.gitignore Excludes node_modules/, generated dist/, types/, coverage outputs.
.gitpod.yml Optional one-click Gitpod cloud dev environment.
.nvmrc Pinned Node major version (currently 22).

CI and GitHub

File Purpose
.github/workflows/main-ci.yml The single CI workflow. Runs on PRs and pushes to main. Steps: install → build → test → coverage → Coveralls upload → upload dist/ + types/ artifact.
.github/PULL_REQUEST_TEMPLATE.md Default PR description template.
.github/ISSUE_TEMPLATE/ Issue templates (bug, feature).
.github/FUNDING.yml Open Collective funding link.

Changesets

File Purpose
.changeset/config.json Changesets config. linked: [["solid-js", "babel-preset-solid"]] keeps those two packages versioned together. commit: false means pnpm bump writes the markdown file but does not auto-commit it. baseBranch: "main". access: "public".
.changeset/README.md Standard changesets help text.
.changeset/<name>.md (when present) Pending version bump descriptions.

Per-package: packages/solid/

File Purpose
package.json The solid-js manifest. Notable fields: version, the seven-entry exports map, the files array (which controls what npm publishes), dependencies (csstype, seroval, seroval-plugins), and 14 scripts (build, types per entry, link, test, bench).
rollup.config.js Single source of truth for all 16 build outputs.
vite.config.mjs Vitest config: jsdom environment, solid-js and rxcore aliases to source, single-thread/non-isolated to share reactive globals.
babel.config.cjs Babel config used by the test environment (Node target + babel-plugin-jsx-dom-expressions configured against web/src/index).
tsconfig.json, tsconfig.build.json, tsconfig.test.json Root tsconfig; build emit config; test-types config.
web/package.json, web/storage/package.json, store/package.json, h/package.json, html/package.json, universal/package.json Tiny per-entry-point manifests with exports selectors so bundlers see the right dist/.
web/tsconfig.build.json, web/storage/tsconfig.build.json, store/tsconfig.build.json, etc. Per-entry tsc emit configs.
jsx-runtime.d.ts Tiny shim that satisfies TypeScript's jsxImportSource: "solid-js" lookups.

Per-package: packages/babel-preset-solid/

File Purpose
package.json Manifest. Declares babel-plugin-jsx-dom-expressions as runtime dep and solid-js + @babel/core as peers (the solid-js peer is optional: true so the preset works in compile-only contexts).
index.js The actual preset (35 lines).
test.js One-shot snapshot of the JSX → runtime call output.

Per-package: packages/solid-element/

File Purpose
package.json Manifest. Depends on component-register. Peer-depends on solid-js.
tsconfig.json TypeScript config; tsc is the build tool here, not Rollup.
sample.jsx Working example, kept current.

Per-package: packages/solid-ssr/

File Purpose
package.json Manifest. Exports ./static only. Declares babel-preset-solid, express, and rollup as devDependencies for the example builds.
examples/<name>/rollup.config.js Per-strategy bundler config.
examples/<name>/babel.config.cjs (where present) Per-strategy Babel config (sets generate: "ssr" etc.).

Per-package: packages/test-integration/

File Purpose
package.json Private package; workspace:* deps.
babel.config.cjs Babel config for the Vitest sub-suite.
tsconfig.json Minimal tsconfig.

Compile-time flags

Two string sentinels are replaced at build time by @rollup/plugin-replace in packages/solid/rollup.config.js:

Source value Replaced by
"_SOLID_DEV_" true for the dev.* bundles, false everywhere else
"_DX_DEV_" Same

Source code reads these via export const IS_DEV = "_SOLID_DEV_" as string | boolean; and treats them as booleans. Look for IS_DEV references when you need to gate dev-only behaviour.

Export conditions

packages/solid/package.json declares the following package-exports conditions, in priority order:

  1. worker
  2. browser (with nested development for dev builds)
  3. deno
  4. node
  5. development (top-level fallback)
  6. default (types + import + require)

The matching solid-js/web and solid-js/store exports follow the same shape so that import "solid-js" and import "solid-js/web" always resolve to compatible bundles for whichever runtime is active.

Import aliases (test/build only)

These are not part of the published surface. They are aliases used during development:

Alias Where it is configured Resolves to
rxcore packages/solid/rollup.config.js (Babel plugin), packages/solid/vite.config.mjs (Vite resolve.alias) packages/solid/web/src/core (in tests / browser bundle) or a server-only equivalent (in server bundle)
solid-js packages/solid/vite.config.mjs resolve.alias packages/solid/src
solid-js/web packages/solid/vite.config.mjs resolve.alias packages/solid/web/src
solid-js/jsx-runtime packages/solid/vite.config.mjs resolve.alias packages/solid/src/jsx

If you change the on-disk layout, update both rollup.config.js and vite.config.mjs in lockstep.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.