Skip to content

Use dynamic imports in routes config #1928

Closed
@LinusBorg

Description

@LinusBorg

What problem does this feature solve?

We generally recommend to use code-splitting route components when writing apps with vue-router, but the code generated by vue-cli when selecting the router feature does use static imports.

In order to make users adopt per-route code-splitting, we should demonstrate the necessary code in the generated router.js file

What does the proposed API look like?

Rewriting static imports in this file as dynamic imports.


I'll do a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementintend to implementThe team has the intention to implement this feature at some point. Contribution is also welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions