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

jaz-vite-poc

v1.0.0

Published

Booking Design System POC using Vite

Readme

Booking Design System - Vite POC

This repository is a proof of concept for using Vite as a bundler for the Booking Design System component library. It demonstrates how to set up a React component library with TypeScript, Tailwind CSS, Storybook, and Jest testing using Vite instead of Rollup.

Project Purpose

The purpose of this project is to validate the feasibility of using Vite for our component library by:

  1. Setting up a minimal project structure
  2. Building and publishing a sample component
  3. Testing the component inside the OBE project
  4. Comparing Vite vs Rollup for component library development

Features

  • ⚡️ Vite - Fast development and building
  • 🧩 React - Component library with React
  • 🔧 TypeScript - Type safety and better developer experience
  • 🎨 Tailwind CSS - Utility-first CSS framework
  • 📚 Storybook - Component documentation and testing
  • 🧪 Jest - Unit testing
  • 📦 NPM Package - Publishable as an NPM package

Getting Started

Installation

# Clone the repository
git clone https://github.com/your-org/booking-design-system-vite-poc.git
cd booking-design-system-vite-poc

# Install dependencies
yarn install

Development

# Start Storybook for component development
yarn storybook

# Run tests
yarn test

Building

# Build the library
yarn build

Usage

After installing the package from NPM, you can import components like this:

import { Button } from '@booking-design-system/vite-poc';
import '@booking-design-system/vite-poc/style.css'; // Import styles

function App() {
  return (
    <div>
      <Button variant="primary">Click me</Button>
    </div>
  );
}

Project Structure

/
├── .storybook/          # Storybook configuration
├── src/
│   ├── components/      # UI components
│   │   ├── Button/      # Sample Button component
│   │   │   ├── Button.tsx
│   │   │   ├── Button.stories.tsx
│   │   │   ├── Button.test.tsx
│   │   │   └── index.ts
│   ├── index.css        # Main CSS file with Tailwind imports
│   └── index.ts         # Main entry point
├── vite.config.ts       # Vite configuration
├── tsconfig.json        # TypeScript configuration
└── package.json         # Package configuration

Publishing

To publish the package to NPM:

# Login to NPM
yarn login

# Publish the package
yarn publish

Vite vs Rollup Comparison

Advantages of Vite

  1. Development Speed: Vite offers significantly faster development experience with its dev server that leverages native ES modules.
  2. Simplified Configuration: Vite requires less configuration compared to Rollup, with sensible defaults.
  3. Built-in Features: Vite comes with built-in support for TypeScript, CSS modules, and other features that require plugins in Rollup.
  4. Hot Module Replacement: Better HMR support out of the box.
  5. Unified Tool: Vite can handle both development and production builds, eliminating the need for separate tools.

Advantages of Rollup

  1. Maturity: Rollup is more mature and has been used for library bundling for longer.
  2. Fine-grained Control: Rollup offers more fine-grained control over the bundling process.
  3. Tree Shaking: While both support tree shaking, Rollup was built with this as a primary focus.

Conclusion

Vite provides a more modern and streamlined approach to building component libraries with excellent developer experience, while still leveraging Rollup under the hood for production builds. For most component libraries, Vite offers a better developer experience without sacrificing build quality.

Testing in OBE

After publishing the package, you can test it in the OBE project by:

  1. Installing the package:

    yarn add @booking-design-system/vite-poc
  2. Importing and using components:

    import { Button } from '@booking-design-system/vite-poc';
    import '@booking-design-system/vite-poc/style.css';
       
    // Use the component in your OBE project
  3. Verify that:

    • Styles are correctly applied
    • TypeScript types work properly
    • The component functions as expected