Home

Issue: 112

Define custom routes on nuxt.config.js

[issue link]

There is any options to set a custom route without change the folder structure?

module.exports = {
  srcDir: resolve('./app'),
  head: {
    title: 'starter',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', content: 'Nuxt.js project' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' }
    ]
  },
  css: ['~assets/css/main.css'],
  loading: { color: '#3B8070' },
  router: {
    linkActiveClass: 'active',
    **routes: [{
      name: 'banana',
      path: '/banana',
      component: 'pages/index.vue'
    }]**
  }
};
This feature request is available on Nuxt.js community (#c91)