# @tailwindcss/webpack

> A webpack loader for Tailwind CSS v4.

Latest version **4.3.3** (published 2026-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tailwindcss/webpack
pnpm add @tailwindcss/webpack
yarn add @tailwindcss/webpack
bun add @tailwindcss/webpack
```

## Health

**Score 80/100 (A)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo; extremely popular.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.3.3 |
| Published | 2026-07-16 |
| First published | 2026-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 97610 |
| Maintainers | reinink, adamwathan, malfaitrobin |

## Links

- npm: https://www.npmjs.com/package/@tailwindcss/webpack
- Repository: https://github.com/tailwindlabs/tailwindcss
- Homepage: https://tailwindcss.com
- Issues: https://github.com/tailwindlabs/tailwindcss/issues
- npm.io page: https://npm.io/package/@tailwindcss/webpack

## Dependencies (4)

- [tailwindcss](https://npm.io/package/tailwindcss.md) 4.3.3
- [@alloc/quick-lru](https://npm.io/package/@alloc/quick-lru.md) ^5.2.0
- [@tailwindcss/node](https://npm.io/package/@tailwindcss/node.md) 4.3.3
- [@tailwindcss/oxide](https://npm.io/package/@tailwindcss/oxide.md) 4.3.3

## Recent versions

- 4.3.3 (latest) — 2026-07-16
- 0.0.0-insiders.41d9cae (insiders) — 2026-09-08
- 0.0.0-insiders.f723e83 — 2026-08-31
- 0.0.0-insiders.90f8ff4 — 2026-08-14
- 0.0.0-insiders.7a7f386 — 2026-08-14
- 0.0.0-insiders.021b7fe — 2026-08-14
- 0.0.0-insiders.f7f58f0 — 2026-08-13
- 0.0.0-insiders.de9e71c — 2026-08-13
- 0.0.0-insiders.00ef99d — 2026-08-13
- 0.0.0-insiders.b9286a7 — 2026-08-13
- 0.0.0-insiders.84bea42 — 2026-08-13
- 0.0.0-insiders.8ac18c7 — 2026-08-13
- 0.0.0-insiders.b86a6e0 — 2026-08-12
- 0.0.0-insiders.16e94cb — 2026-08-10
- 0.0.0-insiders.46df7ee — 2026-08-07
- … 200 more at https://npm.io/package/@tailwindcss/webpack/versions

## README

<p align="center">
  <a href="https://tailwindcss.com" target="_blank">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg">
      <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg">
      <img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;">
    </picture>
  </a>
</p>

<p align="center">
  A utility-first CSS framework for rapidly building custom user interfaces.
</p>

<p align="center">
    <a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=main" alt="Build Status"></a>
    <a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
    <a href="https://github.com/tailwindlabs/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
    <a href="https://github.com/tailwindlabs/tailwindcss/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
</p>

---

## Documentation

For full documentation, visit [tailwindcss.com](https://tailwindcss.com).

## Community

For help, discussion about best practices, or feature ideas:

[Discuss Tailwind CSS on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions)

## Contributing

If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindlabs/tailwindcss/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.

---

## @tailwindcss/webpack

A webpack loader for Tailwind CSS v4.

## Installation

```sh
npm install @tailwindcss/webpack
```

### Usage

```javascript
// webpack.config.js
const MiniCssExtractPlugin = require('mini-css-extract-plugin')

module.exports = {
  plugins: [new MiniCssExtractPlugin()],
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: [MiniCssExtractPlugin.loader, 'css-loader', '@tailwindcss/webpack'],
      },
    ],
  },
}
```

Then create a CSS file that imports Tailwind:

```css
/* src/index.css */
@import 'tailwindcss';
```

### Options

#### `base`

The base directory to scan for class candidates. Defaults to the current working directory.

```javascript
{
  loader: '@tailwindcss/webpack',
  options: {
    base: process.cwd(),
  },
}
```

#### `optimize`

Whether to optimize and minify the output CSS. Defaults to `true` in production mode.

```javascript
{
  loader: '@tailwindcss/webpack',
  options: {
    optimize: true, // or { minify: true }
  },
}
```

---
_Source: https://npm.io/package/@tailwindcss/webpack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
