Skip to content

Commit 484acb3

Browse files
authored
Fix using backslashes in content globs (#5628)
* Normalize content globs * Update changelog
1 parent 0b23d2e commit 484acb3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434

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

3839
## [2.2.16] - 2021-09-26
3940

src/cli.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import fastGlob from 'fast-glob'
1515
import getModuleDependencies from './lib/getModuleDependencies'
1616
import log from './util/log'
1717
import packageJson from '../package.json'
18+
import normalizePath from 'normalize-path'
1819

1920
let env = {
2021
DEBUG: process.env.DEBUG !== undefined,
@@ -437,12 +438,14 @@ async function build() {
437438
}
438439

439440
function extractFileGlobs(config) {
440-
return extractContent(config).filter((file) => {
441-
// Strings in this case are files / globs. If it is something else,
442-
// like an object it's probably a raw content object. But this object
443-
// is not watchable, so let's remove it.
444-
return typeof file === 'string'
445-
})
441+
return extractContent(config)
442+
.filter((file) => {
443+
// Strings in this case are files / globs. If it is something else,
444+
// like an object it's probably a raw content object. But this object
445+
// is not watchable, so let's remove it.
446+
return typeof file === 'string'
447+
})
448+
.map((glob) => normalizePath(glob))
446449
}
447450

448451
function extractRawContent(config) {

0 commit comments

Comments
 (0)