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

@coresystems/config-vite

v2.0.0

Published

Shared Vite configurations for coresystems

Readme

@coresystems/config-vite

Factory functions for Vite configuration.

| Function | Use case | | ---------------------- | ----------------------- | | defineReactAppConfig | React application | | defineReactLibConfig | React component library |


Usage

Both factories accept either an options object or a callback (env: ConfigEnv) => options — mirroring Vite's native defineConfig API.

Both are re-exported from the package root:

import { defineReactAppConfig, defineReactLibConfig } from '@coresystems/config-vite';

Options object

// vite.config.ts
export default defineReactAppConfig({ port: 3000 });

Callback form

// vite.config.ts
export default defineReactAppConfig(({ mode }) => ({
  proxy: mode === 'development' ? { '/api': { target: import.meta.VITE_API_URL, changeOrigin: true } } : undefined,
}));

defineReactAppConfig

Dev server app with HMR. Includes react() plugin.

// vite.config.ts
import { defineReactAppConfig } from '@coresystems/config-vite/react-app';
export default defineReactAppConfig({ port: 3000 });

Options

| Option | Type | Default | Description | | -------------- | ---------------------------------------- | ------- | --------------------------------------------------------------------- | | port | number | 5173 | Dev server port | | host | string \| boolean | — | IP addresses to listen on. Use '0.0.0.0' for LAN/public access. | | proxy | Record<string, string \| ProxyOptions> | — | Dev server proxy rules (server.proxy) | | watch | WatchOptions \| null | — | Chokidar watch options, or null to disable file-system watching. | | alias | AliasOptions \| 'match-tsconfig' | — | Path aliases. Pass 'match-tsconfig' to resolve from tsconfig paths. | | extraPlugins | PluginOption[] | [] | Additional plugins. react() is already included. |


defineReactLibConfig

Lib mode with dual ESM/CJS output. Includes react() + dts() plugins. React is always external — never bundled.

// vite.config.ts
import { defineReactLibConfig } from '@coresystems/config-vite/react-lib';
export default defineReactLibConfig({ entry: 'src/index.ts' });

Base options

| Option | Type | Default | Description | | -------------- | ---------------------------------- | ------- | --------------------------------------------------------------------- | | alias | AliasOptions \| 'match-tsconfig' | — | Path aliases. Pass 'match-tsconfig' to resolve from tsconfig paths. | | extraPlugins | PluginOption[] | [] | Additional plugins. react() and dts() are already included. |

Build options

| Option | Type | Default | Description | | ---------- | ---------------------------------- | --------------------------------------------- | ----------------------------------------------------------------- | | entry | string \| Record<string, string> | required | Library entry point(s). Pass a record for multiple named entries. | | name | string | — | Global variable name exposed in UMD/IIFE builds. | | formats | LibraryFormats[] | ['es', 'cjs'] | Output bundle formats. | | external | string[] | ['react', 'react-dom', 'react/jsx-runtime'] | Module IDs to exclude from the bundle. |

DTS options

| Option | Type | Default | Description | | ------------------- | ---------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | shouldRollupTypes | boolean | — | Rollup type declaration files into a single .d.ts after emitting them. | | tsconfigPath | string | 'tsconfig.json' | Absolute path to the tsconfig used for declaration generation. Override when using a non-standard tsconfig path — pass resolve(import.meta.dirname, 'tsconfig.build.json'). | | excludeFromDts | string[] | ['**/*.stories.*', '**/*.test.*', '**/*.spec.*', '**/*.config.*', '**/tests/**'] | Glob patterns excluded from type declaration generation. |