0.0.26 • Published 2 years ago
transform-to-tailwindcss v0.0.26
This library is to convert css to tailwindcss. tailwindcss can reuse styles better to reduce the packaging volume, which can be converted as a performance optimization method, and it can also make it easier for old projects to upgrade to tailwindcss. If you want to use unocss, you can use transformToUnocss.
📦 Install
npm i -g transform-to-tailwindcss🦄 cli
## command: totailwindcss + directory
totailwindcss playground
## revoke: totailwindcss + directory + --revert
totailwindcss payground --revert🌈 Usage
// vite.config.ts
import { vitePluginTransformTotailwindcss } from 'transform-to-tailwindcss'
export default defineConfig({
plugins: [vitePluginTransformTotailwindcss(/* options */)],
})// rollup.config.js
import { resolve } from 'node:path'
import { rollupTransformTotailwindcss } from 'transform-to-tailwindcss'
export default {
plugins: [rollupTransformTotailwindcss(/* options */)],
}// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('transform-to-tailwindcss').webpackTransformTotailwindcss({
/* options */
}),
],
}// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('transform-to-tailwindcss').webpackTransformTotailwindcss({
/* options */
}),
],
},
}// esbuild.config.js
import { build } from 'esbuild'
import { esbuildTransformTotailwindcss } from 'transform-to-tailwindcss'
build({
plugins: [esbuildTransformTotailwindcss(/* options */)],
})⭐ Feature
- support css in '.html' | '.tsx' | '.vue' | '.astro' | '.svelte' to tailwindcss
- support sass less stylus convert
- support vite | rollup | webpack | vue-cli | esbuild
- vscode extension To tailwindcss
🚁 More
- transform-to-tailwindcss-core - Provides the ability to convert css to tailwindcss on the browser side
Before

After

:coffee:
License
0.0.26
2 years ago
0.0.23
2 years ago
0.0.24
2 years ago
0.0.25
2 years ago
0.0.22
2 years ago
0.0.21
2 years ago
0.0.20
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.0.15
2 years ago
0.0.16
2 years ago
0.0.17
2 years ago
0.0.11
2 years ago
0.0.3
3 years ago
0.0.10
3 years ago
0.0.2
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.1
3 years ago