Skip to content

Commit 3083b0a

Browse files
committed
chore: add mangleClassFilter options
1 parent 14f151a commit 3083b0a

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

apps/vite-vue/src/App.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,39 @@
7575
</main>
7676
</template>
7777

78+
<script lang="ts">
79+
import { onMounted, defineComponent } from 'vue'
80+
81+
export default defineComponent({
82+
setup() {
83+
onMounted(() => {
84+
const clipPath = '';
85+
document.documentElement.animate(
86+
{
87+
clipPath
88+
},
89+
{
90+
duration: 500,
91+
easing: /* tw-mangle ignore */ 'ease-out',
92+
pseudoElement: '::view-transition-new(root)'
93+
})
94+
document.documentElement.animate(
95+
{
96+
clipPath
97+
},
98+
{
99+
duration: 500,
100+
easing: 'ease-out',
101+
pseudoElement: '::view-transition-new(root)'
102+
}
103+
)
104+
})
105+
return {}
106+
}
107+
})
108+
109+
</script>
110+
78111
<style scoped>
79112
.logo {
80113
height: 6em;

apps/vite-vue/vite.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
import { defineConfig } from 'vite'
22
import vue from '@vitejs/plugin-vue'
3-
import { vitePlugin as utwm } from 'unplugin-tailwindcss-mangle'
3+
import { vitePlugin as utwm, defaultMangleClassFilter } from 'unplugin-tailwindcss-mangle'
44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [
77
vue(),
88
utwm({
9+
mangleClassFilter(className) {
10+
if (['ease-out', 'ease-linear', 'ease-in', 'ease-in-out'].includes(className)) {
11+
return false
12+
}
13+
return defaultMangleClassFilter(className)
14+
},
915
classSetOutput: true,
1016
classMapOutput: true
1117
})

0 commit comments

Comments
 (0)