Extracting router configuration into separate files

Start by creating a new ClientApp/router directory, which will ultimately contain two files: index.js and routes.js. Starting with routes.js, we need to extract our page component import statements out of ClientApp/boot.js and drop them at the top of this new file:

//import page componentsimport Catalogue from "../pages/Catalogue.vue";import Product from "../pages/Product.vue";import Cart from "../pages/Cart.vue";import Checkout from "../pages/Checkout.vue";import Account from "../pages/Account.vue";//import admin pagesimport AdminIndex from "../pages/admin/Index.vue";import AdminOrders from "../pages/admin/Orders.vue";import AdminProducts from "../pages/admin/Products.vue";import AdminCreateProduct ...

Get ASP.NET Core 2 and Vue.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.