This repository was archived by the owner on Sep 24, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ const purifyCss = new PurifyCSSPlugin({
2222 }
2323} ) ;
2424
25+ webpackConfig . entry . main = helpers . root ( '/src/module.ts' ) ;
26+
2527webpackConfig . output = {
2628 path : helpers . root ( '/dist' ) ,
2729 filename : 'index.js' ,
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { createRouter } from './router';
55
66const navbarComponent = ( ) => import ( './components/navbar' ) . then ( ( { NavbarComponent } ) => NavbarComponent ) ;
77// const navbarComponent = () => import(/* webpackChunkName: 'navbar' */'./components/navbar').then(({ NavbarComponent }) => NavbarComponent);
8-
98import './sass/main.scss' ;
109
1110if ( process . env . ENV === 'development' && module . hot ) {
Original file line number Diff line number Diff line change 1+ import { RouteConfig } from 'vue-router' ;
2+
3+ const homeComponent = ( ) => import ( './components/home' ) . then ( ( { HomeComponent} ) => HomeComponent ) ;
4+ const aboutComponent = ( ) => import ( './components/about' ) . then ( ( { AboutComponent} ) => AboutComponent ) ;
5+ const listComponent = ( ) => import ( './components/list' ) . then ( ( { ListComponent} ) => ListComponent ) ;
6+
7+
8+ export function createRoutes ( prefix : string = '' ) : RouteConfig [ ] {
9+ return [
10+ {
11+ path : prefix + '/' ,
12+ component : homeComponent ,
13+ } ,
14+ {
15+ path : prefix + '/about' ,
16+ component : aboutComponent ,
17+ } ,
18+ {
19+ path : prefix + '/list' ,
20+ component : listComponent ,
21+ }
22+ ] ;
23+ }
You can’t perform that action at this time.
0 commit comments