perf: if need parse path

This commit is contained in:
Ricardo Gobbo de Souza 2018-02-14 17:32:41 -02:00
parent 764fe7b8f1
commit f7928d0413

View File

@ -73,10 +73,9 @@ module.exports = class ModuleContainer {
addLayout(template, name) {
const { dst, src } = this.addTemplate(template)
const srcPath = path.parse(src)
// Add to nuxt layouts
this.options.layouts[name || srcPath.name] = `./${dst}`
this.options.layouts[name || path.parse(src).name] = `./${dst}`
}
addServerMiddleware(middleware) {