How to use the nuxt.config.js 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 bluebeel / now-nuxt / index.js View on Github external
const nodeModules = excludeFiles(
        await glob('node_modules/**', workPath),
        file => file.startsWith('node_modules/.cache'),
    );
    const launcherFiles = {
        'now__bridge.js': new FileFsRef({
            fsPath: require('@now/node-bridge')
        }),
    };
    const nuxtFiles = {
        ...nodeModules,
        ...dotNuxtServerRootFiles,
        ...launcherFiles,
    };
    if (filesAfterBuild['nuxt.config.js']) {
        nuxtFiles['nuxt.config.js'] = filesAfterBuild['nuxt.config.js'];
    }
    const dist = await glob(
        '**/!(pages)/*',
        path.join(workPath, '.nuxt', 'dist'),
    );
    const pages = await glob(
        '**/*.js',
        path.join(workPath, '.nuxt', 'dist', 'client', 'pages'),
    );

    const launcherPath = path.join(__dirname, 'launcher.js');
    const launcherData = await readFile(launcherPath, 'utf8');

    const lambdas = {};
    await Promise.all(
        Object.keys(pages).map(async (page) => {
github nuxt / create-nuxt-app / saofile.js View on Github external
type: 'add',
        files: '**',
        templateDir: `template/frameworks/${this.answers.test}`
      })
    }

    if (this.answers.server !== 'none') {
      if (this.answers.server === 'adonis') {
        const files = {}
        for (const action of actions) {
          const options = { cwd: join(rootDir, action.templateDir), dot: true }
          for (const file of glob.sync(`*`, options)) {
            files[file] = `resources/${file}`
          }
        }
        files['nuxt.config.js'] = 'config/nuxt.js'

        actions.push({
          type: 'move',
          patterns: files
        })
      }
      actions.push({
        type: 'add',
        files: '**',
        templateDir: `template/frameworks/${this.answers.server}`
      })
    }

    actions.push({
      type: 'add',
      files: '*',
github bluebeel / now-nuxt / index.js View on Github external
const dotNuxtServerRootFiles = await glob('.nuxt/dist/*', workPath);
    const nodeModules = excludeFiles(
        await glob('node_modules/**', workPath),
        file => file.startsWith('node_modules/.cache'),
    );
    const launcherFiles = {
        'now__bridge.js': new FileFsRef({
            fsPath: require('@now/node-bridge')
        }),
    };
    const nuxtFiles = {
        ...nodeModules,
        ...dotNuxtServerRootFiles,
        ...launcherFiles,
    };
    if (filesAfterBuild['nuxt.config.js']) {
        nuxtFiles['nuxt.config.js'] = filesAfterBuild['nuxt.config.js'];
    }
    const dist = await glob(
        '**/!(pages)/*',
        path.join(workPath, '.nuxt', 'dist'),
    );
    const pages = await glob(
        '**/*.js',
        path.join(workPath, '.nuxt', 'dist', 'client', 'pages'),
    );

    const launcherPath = path.join(__dirname, 'launcher.js');
    const launcherData = await readFile(launcherPath, 'utf8');

    const lambdas = {};
    await Promise.all(

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 3 days ago

Package Health Score

83 / 100
Full package analysis