fix(cli): don't use absolute path of .cache/nuxt as transpilation pattern (#7775)

This commit is contained in:
Daniel Roe 2020-07-27 09:54:56 +01:00 committed by GitHub
parent c2c6923ee4
commit 5f7d675807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,9 @@ async function getNuxt (args, cmd) {
config.buildDir = (config.static && config.static.cacheDir) || path.resolve(config.rootDir, 'node_modules/.cache/nuxt')
config.build = config.build || {}
config.build.transpile = config.build.transpile || []
config.build.transpile.push(config.buildDir)
if (!config.static || !config.static.cacheDir) {
config.build.transpile.push('.cache/nuxt')
}
const nuxt = await cmd.getNuxt(config)