Static GitHub Issues

[112] Define custom routes on nuxt.config.js

prev: Loading component stop working after using vue-router in page method
next: Export or distribute components for distribution.

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'
    }]**
  }
};
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c91">#c91</a>)</em></sub></div>