mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
perf: if need parse path
This commit is contained in:
parent
764fe7b8f1
commit
f7928d0413
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user