A Vite plugin to obfuscate Tailwind CSS class when running on production.
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()
],
});
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.
})
],
});
- Vue
- React
- Svelte (coming soon)
To run tests, run the following command
npm run test
If you have any feedback, please reach out to us at [email protected]