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({
22
22
}
23
23
} ) ;
24
24
25
+ webpackConfig . entry . main = helpers . root ( '/src/module.ts' ) ;
26
+
25
27
webpackConfig . output = {
26
28
path : helpers . root ( '/dist' ) ,
27
29
filename : 'index.js' ,
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import { createRouter } from './router';
5
5
6
6
const navbarComponent = ( ) => import ( './components/navbar' ) . then ( ( { NavbarComponent } ) => NavbarComponent ) ;
7
7
// const navbarComponent = () => import(/* webpackChunkName: 'navbar' */'./components/navbar').then(({ NavbarComponent }) => NavbarComponent);
8
-
9
8
import './sass/main.scss' ;
10
9
11
10
if ( 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