fix(cli): normalize win32 paths for nuxt generate cache snapshots (#7796)

Co-authored-by: lihbr <lihbr@users.noreply.github.com>
This commit is contained in:
lihbr 2020-07-28 14:38:06 +02:00 committed by GitHub
parent e295ae7ffd
commit 4db7e432df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@
"pretty-bytes": "^5.3.0",
"serve-static": "^1.14.1",
"std-env": "^2.2.1",
"upath": "^1.2.0",
"wrap-ansi": "^6.2.0"
},
"publishConfig": {

View File

@ -1,4 +1,5 @@
import path, { relative } from 'path'
import upath from 'upath'
import fs from 'fs-extra'
import crc32 from 'crc/lib/crc32'
import consola from 'consola'
@ -48,7 +49,7 @@ export async function ensureBuild (cmd) {
// Take a snapshot of current project
const snapshotOptions = {
rootDir: nuxt.options.rootDir,
ignore: nuxt.options.generate.cache.ignore,
ignore: nuxt.options.generate.cache.ignore.map(upath.normalize),
globbyOptions: nuxt.options.generate.cache.globbyOptions
}