Skip to content

Commit

Permalink
feat: app template routes use configuration (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycjcl868 authored Oct 16, 2019
1 parent 5aa82ed commit 9df976f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/generators/app/templates/.umirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
// ref: https://umijs.org/config/
export default {
treeShaking: true,
routes: [
{
path: '/',
component: '../layouts/index',
routes: [
{ path: '/', component: '../pages/index' }
]
}
],
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
Expand Down
9 changes: 9 additions & 0 deletions lib/generators/app/templates/.umirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import { IConfig } from 'umi-types';
// ref: https://umijs.org/config/
const config: IConfig = {
treeShaking: true,
routes: [
{
path: '/',
component: '../layouts/index',
routes: [
{ path: '/', component: '../pages/index' }
]
}
],
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
Expand Down

0 comments on commit 9df976f

Please sign in to comment.