From 2ab6e6e30dabe3b3da9ee207e65e751e735d95f9 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Tue, 28 Sep 2021 16:32:12 +0100 Subject: [PATCH 1/2] Normalize content globs --- src/cli.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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) { From 7e467137843367ec22aaa269a9e5bf324fc79b05 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Wed, 29 Sep 2021 13:44:30 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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