Skip to content

What if I wanted to have bundle per every single route #10

Open
@vojtatranta

Description

@vojtatranta

Because if I write it like this

export default {
  path: '/',
  component: App,
  indexRoute: {
    component: Bio
  },
  getChildRoutes(location, cb) {
    return [
      require.ensure([], (require) => cb(null, [require('./blog')])),
      require.ensure([], (require) => cb(null, [require('./contact')])),
      require.ensure([], (require) => cb(null, [require('./about')])),
    ]
  },
}

and I go for example to route /blog, all the extra 2 bundles with /contact and /about download.
And I want to download these only when they are clicked. What am I doing wrong? Should I nest that require.ensure calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions