npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stealthscale/vite-config-typescript

v0.3.0

Published

Sets the TypeScript options every stealthscale package compiles with.

Downloads

461

Readme

@stealthscale/vite-config-typescript

@stealthscale/vite-config-typescript publishes the TypeScript settings every stealth package compiles under. base.json sets the compiler options and says nothing about where the code runs. node.json and web.json each add one environment on top of it. A package extends one of the three and states nothing further unless its layout differs.

Install

pnpm add -D @stealthscale/vite-config-typescript

TypeScript reads the three JSON files directly. The package has no dependencies and no peers.

Usage

Extend the tier for the environment your package runs in. A package the console runs extends node.json and stops there:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@stealthscale/vite-config-typescript/node.json"
}

A package the browser runs extends web.json. Extend base.json where the source uses the language alone.

@stealthscale/vite-config-react publishes a web.json of its own, and a package that renders React extends both. The React file is a fragment rather than a tier: it sets jsx to react-jsx and extends nothing. List the tier first and the fragment second, in the array form.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": [
    "@stealthscale/vite-config-typescript/web.json",
    "@stealthscale/vite-config-react/web.json"
  ]
}

Reference

| Config | Extends | What it sets | | ----------- | ----------- | --------------------------------------------------------------------------------------------- | | base.json | Nothing | Every option in the following table, and the include list | | node.json | base.json | types, as ["vite-plus", "node"] | | web.json | base.json | lib, as ["es2023", "dom", "dom.iterable"], and types, as ["vite-plus", "vite/client"] |

base.json sets the options below. Every option written without a value is true.

| Group | Options | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Language level | target: esnext, lib: ["es2023"], module: preserve, moduleDetection: force | | Resolution | customConditions: ["stealth-source"], types: ["vite-plus"], resolveJsonModule, allowImportingTsExtensions, allowArbitraryExtensions, noUncheckedSideEffectImports | | Erasable syntax | verbatimModuleSyntax, erasableSyntaxOnly | | Strictness | strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noPropertyAccessFromIndexSignature, noImplicitOverride, noImplicitReturns, noFallthroughCasesInSwitch, allowUnreachableCode: false | | Output | noEmit, skipLibCheck |

types is the one place a stealth tsconfig.json names the toolchain, and source files import vite. The toolchain's types augment Vite's UserConfig with pack, lint, fmt, run, staged and test, so a vite.config.ts that writes any of those keys type-checks only while vite-plus is in scope. Leaving types out altogether puts every @types/* package anywhere in node_modules in scope instead.

Note: extends replaces an array rather than adding to it. A tsconfig.json that states its own types drops vite-plus and everything the toolchain declares. Name it again in any types array you write, as node.json and web.json both do.

Source resolution

customConditions lists one condition, stealth-source. Each stealth repository resolves its own packages through it, and the string matches the SOURCE constant in @stealthscale/vite-config. Publish that condition in a workspace package's exports beside default, pointing at ./src/index.ts, and the compiler reads the TypeScript source instead of the build output. Within a single package, the #* subpath in its own manifest does the same job, and these files never name it.

What gets compiled

include covers ${configDir}/src, ${configDir}/vite.config.ts, ${configDir}/vite.layers.ts, and the theme statement an application writes beside its configuration, ${configDir}/theme.config.ts with ${configDir}/theme.config.spec.ts. ${configDir} resolves against the tsconfig.json that does the extending rather than against the file it extends, and that is what lets one list serve every package. A relative path in its place would point at this package rather than at yours. A package whose layout differs writes its own include, which replaces the inherited list.

Licence

MIT. See LICENSE.