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

vite-plugin-uxdsl

v0.1.8

Published

Vite loader for .uxdsl files

Downloads

17

Readme

vite-plugin-uxdsl

The official Vite plugin for UXDSL — seamlessly integrating .uxdsl files into your Vite projects.

npm version License

Visit the Official Documentation & Playground


Overview

vite-plugin-uxdsl provides a fast and efficient way to process .uxdsl files within your Vite development and build workflows. It acts as a custom loader, transforming your UXDSL syntax into standard CSS, allowing Vite to bundle it effectively. This is the recommended and most actively supported integration for UXDSL in modern frontend projects.

Features

  • Zero-Config (Optional): Works out of the box with minimal setup for common use cases.
  • Hot Module Replacement (HMR): Enjoy instant CSS updates without page refreshes during development.
  • Optimized Builds: Integrates smoothly with Vite's highly optimized production builds.
  • Full UXDSL Feature Support: Leverage all UXDSL features like theme functions, responsive utilities, and smart mixins.

Installation

npm install vite-plugin-uxdsl uxdsl-core --save-dev

Usage

1. Configure the Plugin

Add vite-plugin-uxdsl to your vite.config.js or vite.config.ts:

// vite.config.js
import { defineConfig } from 'vite';
import vitePluginUxdsl from 'vite-plugin-uxdsl';

export default defineConfig({
  plugins: [
    vitePluginUxdsl({
      // Optional: Custom breakpoints (defaults shown)
      breakpoints: {
        xs: 0,
        sm: 480,
        md: 768,
        lg: 1024,
        xl: 1280,
      },
      // Optional: Pass other options directly to uxdsl-core
    }),
  ],
});

2. Import Your Styles

In your application's main entry file (e.g., main.js, main.ts, App.jsx, App.tsx), import your .uxdsl stylesheet:

// main.js or App.jsx
import './index.uxdsl';
// or
import './app.uxdsl';

3. TypeScript Support

If you are using TypeScript, you may encounter a Cannot find module... error (TS2307) when importing .uxdsl files. To fix this, you need to provide a type declaration.

If vite-env.d.ts exists: Add the following to your vite-env.d.ts file:

If vite-env.d.ts does not exist: Create a new file (e.g., src/uxdsl-env.d.ts or uxdsl-env.d.ts at your project root) and add the following content:

/// <reference types="vite/client" />

declare module '*.uxdsl' {
  const content: string;
  export default content;
}

Ensure your tsconfig.json's include array covers this new file (e.g., "include": ["src/**/*.ts", "src/**/*.d.ts"]).

Options

The plugin accepts options that are passed directly to uxdsl-core's processing engine:

  • breakpoints: An object defining custom responsive breakpoints (e.g., { sm: 480, md: 768 }).
  • Any other valid options for the processUxdsl function from uxdsl-core.

License

MIT © Ricardo Santoyo