Skip to content

Commit 9cbe546

Browse files
Cleanups
1 parent 1906991 commit 9cbe546

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/@tailwindcss-vite/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,19 @@ For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
3535

3636
The Vite plugin can be configured by passing an object to the `tailwindcss()`. Here is a full list of available options:
3737

38-
| Property | Values |
39-
| --------------------------------------------- | ----------------------------------------- |
40-
| [`scanner`](#disabling-module-graph-scanning) | `module-graph` _(default)_, `file-system` |
38+
| Property | Values |
39+
| --------------------------------------------- | ------------------------------------------------------ |
40+
| [`scanner`](#disabling-module-graph-scanning) | `automatic` _(default)_, `module-graph`, `file-system` |
4141

4242
### Disabling module-graph scanning
4343

4444
Our Vite plugin is designed to take the Vite module graph into account when scanning for utilities used in your project. This will work well in most cases since the module graph contains all markup that will be in your final build.
4545

4646
However, sometimes your Vite setup is split across different build steps (e.g. when using SSR builds). If that is the case, you might find that the client build might contain more utilities since it traverses all components while the server build doesn't.
4747

48-
To ensure that both builds read all components from your project, set the `scanner` option to `file-system`:
48+
When the `scanner` is set to `automatic`, we will automatically use the `file-system` scanner for Astro builds.
49+
50+
To ensure that both builds read all components from your project in other cases, set the `scanner` option to `file-system`:
4951

5052
```js
5153
import { defineConfig } from 'vite'

packages/@tailwindcss-vite/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ export default function tailwindcss(
211211

212212
if (scannerMode === 'automatic') {
213213
if (shouldDisableModuleGraph(config)) {
214-
console.warn('Detected an Astro.js build and opted-out of using the Vite module graph.')
215214
scannerMode = 'file-system'
216215
return
217216
}

0 commit comments

Comments
 (0)