New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

umi-plugin-tailwindcss

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umi-plugin-tailwindcss

umi@3.0 plugin for tailwindcss

latest
Source
npmnpm
Version
4.0.0
Version published
Weekly downloads
152
123.53%
Maintainers
1
Weekly downloads
 
Created
Source

umi-plugin-tailwindcss

This plugin is only valid for umijs 3.x,Umi4 has built-in support for Tailwindcss and is no longer needed for new projects. umi4 tailwind-css doc

中文文档

Install

Using npm:

$ npm install umi-plugin-tailwindcss -D

or using yarn:

$ yarn add umi-plugin-tailwindcss -D

Setup

tailwindCssFilePath?: string.

tailwind.css file path, can be missing。

// .umirc.ts
// eg
...
tailwindcss: {
  tailwindCssFilePath?: '@/tailwind.css',
  tailwindConfigFilePath?: 'tailwind-custom.config.js' // Default value: tailwindConfigFilePath || join(process.env.APP_ROOT || api.cwd, 'tailwind.config.js'),
},
...

Explain

This plugin do the following things to support tailwind in umi。

  • Add tailwindcss dependencies auto. For 4.x: defauts to the latest version tailwindcss@latest For 3.x: defauts to the compat version@tailwindcss/postcss7-compat, because of umi doesn't support postcss8 now)。

    You can also install the specific version of tailwindcss. If tailwindcss exist in devDependencies, plugin will use it, otherwise plugin will use @tailwindcss/postcss7-compat

  • Add Tailwind to your CSS。If tailwindCssFilePath setting exist, plugin will import this css file automatically. If not exist, will create a temporary file, and import it.

  • If tailwind.config.js not exist at tailwindConfigFilePath, it will create one。

  • Add postcss plugin in umi。

Keywords

umi

FAQs

Package last updated on 23 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts