GitHunt
NU

nulltask/nuxt-windicss-module

๐Ÿƒ Windi CSS for Nuxt.js โšก

nuxt-windicss

nuxt-windicss

Windi CSS for Nuxt.js! โšก๏ธ
Next generation utility-first CSS framework.

Features

  • โšก๏ธ It's FAST - 20~100x times faster than @nuxtjs/tailwindcss
  • ๐Ÿงฉ On-demand CSS utilities (Compatible with Tailwind CSS v2) and native elements style resetting
  • ๐Ÿƒ Load configurations from tailwind.config.js
  • ๐Ÿ“„ Use @apply / @screen directives in any file: Vue SFC, Less, SCSS, SASS, PostCSS, Stylus
  • ๐ŸŽณ Support Utility Groups - e.g. bg-gray-200 hover:(bg-gray-100 text-red-300)
  • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Works with @nuxt/vite & @nuxt/content

Install

yarn add nuxt-windicss -D
# npm i nuxt-windicss -D

Usage

Within your nuxt.config.js add the following.

// nuxt.config.js
export default {
  buildModules: [
    'nuxt-windicss',
  ],
}

Migrating from tailwind

This module won't work with @nuxtjs/tailwindcss, you will need to remove it.

buildModules: [
-  '@nuxtjs/tailwindcss',
],

If you have a tailwind.config.js, please rename it to windi.config.js or windi.config.ts.

Follow the migration guide for other change details.

Documentation

Read the documentation for more details.

Credits

  • Windy team
  • @antfu Based on his Rollup / Vite implementation & his util package

License

MIT License ยฉ 2021 Harlan Wilton

Contributors

MIT License
Created June 20, 2021
Updated June 20, 2021