diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d98db76dd75..cdace3daaa52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/cli.js b/src/cli.js index 39b00e3eb261..3835136d28cb 100644 --- a/src/cli.js +++ b/src/cli.js @@ -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, @@ -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) {