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

@asteby/metacore-starter-config

v2.1.0

Published

Shared build & lint configs for metacore apps (Vite + React + Tailwind 4 + TanStack Router + ESLint + TS)

Readme

@asteby/metacore-starter-config

Shared build & lint configs for metacore host applications. Centralizes Tailwind 4, TypeScript, Vite, and ESLint so apps extend instead of copy.

Stability

Stable as of v1.0. The four exported subpaths (./tailwind, ./tsconfig, ./vite, ./eslint) plus ./fonts follow semver. The exact set of plugins wired by defineMetacoreConfig() may grow in minor releases (e.g. new optional integrations); the option object is additive and existing options will not change shape inside the major.

Install

pnpm add -D @asteby/metacore-starter-config

Plus the relevant peers (most apps already have these): vite, @vitejs/plugin-react-swc, @tailwindcss/vite, tailwindcss, typescript, eslint, typescript-eslint, eslint-plugin-react-hooks, eslint-plugin-react-refresh, @tanstack/eslint-plugin-query, globals. Optional: @tanstack/router-plugin, vite-plugin-pwa.

Exports

| Subpath | What it gives you | |---|---| | ./tailwind | Tailwind v4 preset (safelist, plugins hook). Tokens live in @asteby/metacore-theme/tokens.css. | | ./tsconfig | Base compilerOptions (strict, Bundler, ES2020, JSX). Paths are empty — apps define their own. | | ./vite | defineMetacoreConfig() factory with React SWC + Tailwind + optional TanStack Router + optional PWA. Also exports metacoreOptimizeDeps / metacoreOptimizeDepsInclude for apps that build their own Vite config. | | ./eslint | Flat ESLint config array (TS, react-hooks, react-refresh, TanStack Query). | | ./fonts | Canonical fonts tuple (['inter', 'manrope', 'system']) and Font type — single source of truth for <FontProvider fonts={...} />. |

Usage

tsconfig.app.json

{
  "extends": "@asteby/metacore-starter-config/tsconfig",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src"]
}

vite.config.ts

import { defineMetacoreConfig } from '@asteby/metacore-starter-config/vite'

export default defineMetacoreConfig({
  router: true,
  pwa: {
    name: 'My Host',
    shortName: 'My Host',
    description: 'My host application',
    themeColor: '#84cc16',
    backgroundColor: '#1a2e05',
    icons: [/* ... */],
  },
  extend: {
    resolve: {
      alias: { '@': new URL('./src', import.meta.url).pathname },
    },
  },
})

tailwind.config.js (only if you use JS config; v4 apps usually use CSS-only)

import preset from '@asteby/metacore-starter-config/tailwind'

export default {
  presets: [preset],
  content: ['./index.html', './src/**/*.{ts,tsx}'],
}

eslint.config.js

import { defineConfig } from 'eslint/config'
import metacore from '@asteby/metacore-starter-config/eslint'

export default defineConfig(
  { ignores: ['dist', 'src/components/ui'] },
  ...metacore,
)

Module Federation singletons (metacoreFederationShared)

Toda app federada (host o addon) debe compartir las mismas instancias de React, de los providers (@asteby/metacore-{runtime-react,theme,auth,ui}) y del registry del SDK (@asteby/metacore-sdk). Caso contrario, los addons terminan con su propia copia de React y rompen useApi(), useTheme(), useAuth(), los Radix portals, el Registry, etc.

metacoreFederationShared({ host, apps }) devuelve un bloque listo para pasar a @originjs/vite-plugin-federation con los 7 singletons obligatorios ya cableados (singleton: true, requiredVersion: false):

  • react
  • react-dom
  • @asteby/metacore-runtime-react
  • @asteby/metacore-theme
  • @asteby/metacore-auth
  • @asteby/metacore-ui
  • @asteby/metacore-sdk

Host

import federation from '@originjs/vite-plugin-federation'
import { metacoreFederationShared } from '@asteby/metacore-starter-config/vite'

federation(
  metacoreFederationShared({
    host: 'metacore_ops',
    apps: {
      metacore_tickets: 'https://addons.example.com/tickets/remoteEntry.js',
      metacore_orders:  'https://addons.example.com/orders/remoteEntry.js',
    },
  }),
)

Addon

federation(
  metacoreFederationShared({
    host: 'metacore_tickets', // == containerName(manifest) del SDK
    exposes: { './plugin': './src/plugin.tsx' },
  }),
)

Opciones

| Opción | Tipo | Default | Notas | |-------------|---------------------------------------------------|--------------------|-------| | host | string | requerido | name del contenedor de federation. Para hosts: el nombre de la app; para addons: metacore_<addonKey>. | | apps | Record<string, string> | undefined | Mapa name → URL de remotes. Hosts lo usan para enchufar addons; addons normalmente lo omiten. | | filename | string | 'remoteEntry.js' | Override sólo si lo cambia el contrato del runtime. | | exposes | Record<string, string> | undefined | Módulos expuestos al host (lado addon). | | extras | string[] | [] | Paquetes extra a marcar singleton sobre los obligatorios (ej. '@tanstack/react-query'). | | overrides | Record<string, MetacoreFederationShareConfig> | {} | Forzar requiredVersion: '^X' u otro flag por package. Se mergea encima de la entry base. |

La constante exportada METACORE_FEDERATION_SINGLETONS está disponible para tests o validaciones custom (ej. asegurarse de que un addon migrado declara las 7).

Peer suelto: @originjs/vite-plugin-federation debe estar instalado en la app consumidora; no es peer dep obligatorio de este paquete porque la helper sólo emite el objeto y no instancia el plugin.

Pre-bundling linked SDK packages

Apps that consume @asteby/metacore-* via file: or workspace: need Vite to pre-bundle them or the browser sees bare specifiers. defineMetacoreConfig() already wires this. If you build your own Vite config, import the same list:

import { metacoreOptimizeDeps } from '@asteby/metacore-starter-config/vite'

export default defineConfig({
  optimizeDeps: metacoreOptimizeDeps,
})

Notes

  • PWA icon set is not embedded (apps own their assets); pass icons via options.
  • Design tokens (colors, fonts, shadows) remain in @asteby/metacore-theme.