mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Fix webpack building loop
This commit is contained in:
parent
019d00fadb
commit
7a34763277
@ -16,6 +16,7 @@ import serverWebpackConfig from './webpack/server.config.js'
|
|||||||
const debug = require('debug')('nuxt:build')
|
const debug = require('debug')('nuxt:build')
|
||||||
const remove = pify(fs.remove)
|
const remove = pify(fs.remove)
|
||||||
const readFile = pify(fs.readFile)
|
const readFile = pify(fs.readFile)
|
||||||
|
const utimes = pify(fs.utimes)
|
||||||
const writeFile = pify(fs.writeFile)
|
const writeFile = pify(fs.writeFile)
|
||||||
const mkdirp = pify(fs.mkdirp)
|
const mkdirp = pify(fs.mkdirp)
|
||||||
const glob = pify(require('glob'))
|
const glob = pify(require('glob'))
|
||||||
@ -243,7 +244,13 @@ function * generateRoutesAndFiles () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const content = template(templateVars)
|
const content = template(templateVars)
|
||||||
return writeFile(r(this.dir, '.nuxt', file), content, 'utf8')
|
const path = r(this.dir, '.nuxt', file)
|
||||||
|
return writeFile(path, content, 'utf8')
|
||||||
|
.then(() => {
|
||||||
|
// Fix webpack loop (https://github.com/webpack/watchpack/issues/25#issuecomment-287789288)
|
||||||
|
const dateFS = Date.now() / 1000 - 10
|
||||||
|
return utimes(path, dateFS, dateFS)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
yield moveTemplates
|
yield moveTemplates
|
||||||
|
Loading…
Reference in New Issue
Block a user