Skip to content

Commit

Permalink
Fix using backslashes in content globs (#5628)
Browse files Browse the repository at this point in the history
* Normalize content globs

* Update changelog
  • Loading branch information
bradlc authored Sep 29, 2021
1 parent 0b23d2e commit 484acb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix defining colors as functions when color opacity plugins are disabled ([#5470](https://github.com/tailwindlabs/tailwindcss/pull/5470))
- Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
- Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))

## [2.2.16] - 2021-09-26

Expand Down
15 changes: 9 additions & 6 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import fastGlob from 'fast-glob'
import getModuleDependencies from './lib/getModuleDependencies'
import log from './util/log'
import packageJson from '../package.json'
import normalizePath from 'normalize-path'

let env = {
DEBUG: process.env.DEBUG !== undefined,
Expand Down Expand Up @@ -437,12 +438,14 @@ async function build() {
}

function extractFileGlobs(config) {
return extractContent(config).filter((file) => {
// Strings in this case are files / globs. If it is something else,
// like an object it's probably a raw content object. But this object
// is not watchable, so let's remove it.
return typeof file === 'string'
})
return extractContent(config)
.filter((file) => {
// Strings in this case are files / globs. If it is something else,
// like an object it's probably a raw content object. But this object
// is not watchable, so let's remove it.
return typeof file === 'string'
})
.map((glob) => normalizePath(glob))
}

function extractRawContent(config) {
Expand Down

0 comments on commit 484acb3

Please sign in to comment.