Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createLayouts() {
const layouts = glob.sync("*/layout/**/*.vue", { cwd: appDir });
const _layouts = {};
for (const key in layouts) {
_layouts[
path
.basename(layouts[key])
.replace(/\\/g, "/")
.replace(/.vue$/, "")
] = Utils.relativeTo(
path.resolve(".nuxt"),
path.resolve(appDir, layouts[key])
);
}
return _layouts;
}