Skip to content

fantian007/tailwindcss-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

By compiling the tailwind CSS, generating the style and inserting the body independently, you can solve the problem of style overwriting(other library of UI component, like antd & etc.)

Usage

// esm
import { TailwindCssWebpackPlugin } from '@sprit/tailwindcss-webpack-plugin';
// cjs
const { TailwindCssWebpackPlugin } = require('@sprit/tailwindcss-webpack-plugin');

// webpack plugins
{
  plugins: [
    new TailwindCssWebpackPlugin()
  ]
}

Effect

Insert the generated compressed file into the body tag