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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@belsignum/vitex

v1.1.0

Published

A configurable Vite configuration builder class optimized for modular frontend setups such as TYPO3 extensions.

Readme

🛠️ Vitex

A modular and reusable Vite configuration helper tailored for TYPO3 frontend development.

Vitex is designed to simplify the build setup for TYPO3-based projects using Vite. It provides automatic entrypoint resolution, namespaced output for sites handling, and post-build manifest cleanup. It supports multi-site structures, structured SCSS/JS asset handling, and a clean developer experience.

🚀 Features

  • Automatic entrypoint resolution via ViteEntrypoints.json
  • Namespace-aware output naming for sites (e.g. mysite_default, global_main)
  • Manifest cleanup (removes self-imports, normalizes asset names)
  • Configurable aliases, copy targets, plugins, server settings
  • No build step required – raw JS usable directly in dev setup
  • Fully compatible with Vite + TYPO3 + SCSS/JS workflows

New in v1.1.0

  • Optional Root Build support: discover entry points in a project-level Build/Frontend folder
    • Default patterns (configurable):
      • Styles/*.scss, JavaScript/*.js (top-level only)
      • Styles/*/*.scss, JavaScript/*/*.js (one sitename folder level)
  • Sitename-aware output for Root Build (<sitename>_File.css; fallback global_*)
  • PostCSS auto-pickup and CSS minification via esbuild (keeps icon-font PUA glyphs intact)
  • Improved alias resolution and staticCopyTargets handling
  • Post-build manifest normalization retained

📦 Installation

If used locally:

npm install file:./packages/vitex

Or as an installed package:

npm install @belsignum/vitex

🧩 Usage

// vite.config.js
import Vitex from 'vitex';

const vite = new Vitex({
    sitenames: ['mysite', 'other-site'],
    outputPath: 'public/assets/',
    packagesPath: 'packages/sitepackage',
    aliases: [
        { find: '@sitepackage', replacement: 'packages/sitepackage' }
    ],
    staticCopyTargets: [
        { src: 'node_modules/bootstrap-icons/*', dest: 'bootstrap-icons' }
    ],
    server: {
        allowedHosts: ['vite.ddev.site']
    },

    // New in v1.1.0:
    rootBuild: {
        enabled: true,               // enable discovery in Build/Frontend
        path: 'Build/Frontend',
        patterns: [
            'Styles/*.scss',
            'JavaScript/*.js',
            'Styles/*/*.scss',
            'JavaScript/*/*.js'
        ],
        // treat underscore-prefixed files as partials/components
        ignoreUnderscore: true
    }
});

export default vite.getViteConfig();

Scripts

Add npm scripts to your package.json:

"scripts": {
"dev": "vite --host 0.0.0.0",
"build": "vite build",
"watch": "vite build --watch",
"preview": "vite preview"
}

⚙️ Configuration Options

Vitex accepts the following options when creating a new instance:

| Option | Type | Default | Description | |---------------------|------------|----------------------|-------------| | sitenames | string[] | [] | List of TYPO3 site identifiers used for namespacing output files. | | outputPath | string | public/assets/ | Path where compiled assets will be written. | | packagesPath | string | packages/sitepackage | Path to your sitepackage or TYPO3 package containing frontend sources. | | aliases | array | [] | Custom alias definitions passed directly to Vite ({ find, replacement }). | | staticCopyTargets | array | [] | Copy patterns for static assets (uses vite-plugin-static-copy). | | server | object | {} | Extra Vite dev server configuration, e.g. allowedHosts. | | rootBuild | object | { enabled: false } | Enables discovery of entrypoints from a global Build/Frontend folder. | | └─ enabled | boolean | false | Whether root-level build discovery is active. | | └─ path | string | "Build/Frontend" | Folder scanned for global entrypoints. | | └─ patterns | string[] | see below | Glob patterns used to discover SCSS/JS entrypoints.Default: ['Styles/*.scss','JavaScript/*.js','Styles/*/*.scss','JavaScript/*/*.js']. | | └─ ignoreUnderscore | boolean | true | Treat underscore-prefixed files (_partial.scss) as partials and ignore them. |

Changelog

v1.1.0

  • Added support for Root Build (e.g. project-level Build/Frontend)
  • Improved configuration and documentation
  • PostCSS auto-pickup and CSS minification via esbuild (keeps icon-font PUA glyphs intact)

v1.0.3

  • Initial public release

License

MIT License