Vite Plugin Class Mangler screenshot

Vite Plugin Class Mangler

Author Avatar Theme by Kiosion
Updated: 2 Oct 2022
33 Stars

Vite plugin for minifying / obfuscating CSS classes in production builds

Categories

Overview

This article is a product analysis of a plugin that is currently under development. The plugin aims to extract used classes from templates and scripts before bundling, and replace all references within style tags, css, and scss files after parsing. The author invites knowledgeable individuals to contribute to the development of the plugin.

Features

  • Supported frameworks: Vue (In progress), React (In progress), Svelte.
  • Customizable options including ‘Dev’ (determines whether to apply the plugin on serve or build), ‘Min/Max’ (inclusive integers used for randomizing the length of generated classes), and ‘Suffixes’ (array of strings to override default suffixes).
  • Unit testing available.

Installation

The installation process for this plugin is not provided in the article.

Summary

This article introduces a plugin that is currently being developed. It aims to extract used classes from templates and scripts and replace references within style tags, css, and scss files. The plugin is compatible with Vue, React, and Svelte frameworks. It offers customizable options and unit testing capabilities. The author is seeking contributions from individuals who are knowledgeable with the Vite/Rollup plugin APIs. However, no installation instructions are provided in the article.