Skip to content

Commit 2ab6e6e

Browse files
committed
Normalize content globs
1 parent 8004917 commit 2ab6e6e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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)