-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to exclude some files or directories? #29
Comments
There is no particularly effective way to do this. One option is to use import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { vitePlugin as utwm, defaultMangleClassFilter } from 'unplugin-tailwindcss-mangle'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
utwm({
mangleClassFilter(className) {
// all your untouched tailwindcss class name
if (['xxxx','yyyy'].includes(className)) {
return false
}
return defaultMangleClassFilter(className)
},
})
]
}) But this will make all the class names in the target array unobfuscated. Another option is to build your untouched target file into a single-file bundle, and then use the |
Hi, |
I have a file that has some literal TailwindCSS code and its mangling that too.
Is there any way to keep that file untouched? That Tailwindcss code is not used anywhere. Its just a string and I want that untouched.
Thanks for the help.
The text was updated successfully, but these errors were encountered: