Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obfuscate Tailwind CSS classes #240

Open
hmaesta opened this issue Dec 30, 2020 · 13 comments
Open

Obfuscate Tailwind CSS classes #240

hmaesta opened this issue Dec 30, 2020 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hmaesta
Copy link
Contributor

hmaesta commented Dec 30, 2020

For performance proposes, everything that can be made to improve final bundle size is welcome. Even better if automated.

As feature request, would be nice to obfuscate classes on production bundle. Using webpack-obfuscator, for example.

Example

Original code:

# index.vue
<div class="text-gray-500">Hey!</div>

# tailwind.css
.text-gray-500 { color: #888; }

Final code:

# index.html
<div class="a">Hey!</div>

# tailwind.css
.a { color: #888; }
@hmaesta hmaesta added the enhancement New feature or request label Dec 30, 2020
Copy link
Collaborator

atinux commented Jan 8, 2021

If you want to experiment it, please go ahead :)

I don't know the side effects regarding Tailwindcss purge option.

@atinux atinux added the help wanted Extra attention is needed label Jan 14, 2021 — with Volta.net
@684efs3
Copy link

684efs3 commented Feb 25, 2021

Would love this. Someone mentioned that this could work? I haven't tried it: https://github.com/sndyuk/mangle-css-class-webpack-plugin

@stale
Copy link

stale bot commented Jul 30, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 30, 2021
@atinux atinux removed the wontfix This will not be worked on label Aug 2, 2021 — with Volta.net
Copy link
Collaborator

atinux commented Aug 2, 2021

Not stale

@stale
Copy link

stale bot commented Oct 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 2, 2021
@stale stale bot closed this as completed Jan 9, 2022
@gekkedev
Copy link

not stale

@nephix
Copy link

nephix commented Jun 24, 2022

Anyone managed to do this?

@gggglglglg
Copy link

gggglglglg commented Sep 12, 2022

Any news?
I tried mangle-css-class-webpack-plugin, but it doesn't work for me

@thienna
Copy link

thienna commented Jan 5, 2023

Up

@estige
Copy link

estige commented May 29, 2023

up

@ineshbose ineshbose reopened this May 30, 2023
@ineshbose ineshbose changed the title [Feature Request] Obfuscate Tailwind CSS classes Obfuscate Tailwind CSS classes May 30, 2023
@ineshbose ineshbose removed the wontfix This will not be worked on label May 30, 2023
@ineshbose
Copy link
Collaborator

Reopened issue but it could take a while to solve this. PR is more than welcome. 🙂

@ineshbose
Copy link
Collaborator

Has anyone taken a look at tailwindcss-mangle yet?

@JenuelDev
Copy link

is webpack works with vite? or nuxt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants