Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

misbahansori/vite-plugin-tailwind-obfuscate

Repository files navigation

vite-plugin-tailwind-obfusacte

A Vite plugin to obfuscate Tailwind CSS class when running on production.

Screen Shot 2022-06-10 at 07 15 21

Screen Shot 2022-06-10 at 07 14 37

Installation

Warning This plugin is still in development. Proceed with caution.

Install plugin with npm

npm i vite-plugin-tailwind-obfuscate
// https://vitejs.dev/config/

import obfuscate from "vite-plugin-tailwind-obfuscate";

export default defineConfig({
  plugins: [
    obfuscate()
  ],
});

Configuration

export default defineConfig({
  plugins: [
    obfuscate({
      dev: true,  // by default it only run on production. set to true to run on dev and production.
      min: 2,     // minimum number of characters in the obfuscated string.
      max: 8,     // maximum number of characters in the obfuscated string.
      length: 8,  // if length is provided, it will be used instead of min and max.
    })
  ],
});

Supported frameworks

  • Vue
  • React
  • Svelte (coming soon)

Running Tests

To run tests, run the following command

npm run test

Authors

Feedback

If you have any feedback, please reach out to us at [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published