How to use the nuxt.Utils.relativeTo function in nuxt

To help you get started, we’ve selected a few nuxt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github doodooke / doodoo.js / packages / doodoo-plugin-nuxt / lib / index.js View on Github external
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;
}

nuxt

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

MIT
Latest version published 2 days ago

Package Health Score

83 / 100
Full package analysis