区分开发环境和生产环境的import
Former-commit-id: f354740bcee256720d0685db54b80dcc4aae3290 [formerly f354740bcee256720d0685db54b80dcc4aae3290 [formerly f354740bcee256720d0685db54b80dcc4aae3290 [formerly f354740bcee256720d0685db54b80dcc4aae3290 [formerly 6e1bbf7d95e6bbce06058859c46599d5f7ad1e93 [formerly 007c8fe0b4172d3e6441b3915caf427fbd39592e]]]]] Former-commit-id: d335b794275a9686676dc036f34453fed54028f4 Former-commit-id: 132225dd18ae66c09600122661feec3e8fa0012a Former-commit-id: 4473d592787a2fe91582205e2370ff2e0537187c [formerly 9697cba29a1120c778a93114efe60b6dec8890e7] Former-commit-id: c828ba1ac18bda605dc14a3b322f6ed7fef49553 Former-commit-id: 3badc8e5d892fc9bfdafc12bf8d684acfc1c2530 Former-commit-id: 3a9e9162f2badeeaa6be833cc52f17a360fc1936 Former-commit-id: fddd65551dc9e48f110a6c5d4f38f68416af202e Former-commit-id: 15cf6d6f094fa38ce485efbfa68d367ecdc86cc8
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import layoutHeaderAside from '@/layout/header-aside'
|
||||
|
||||
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
|
||||
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
|
||||
|
||||
const meta = { auth: true }
|
||||
|
||||
export default {
|
||||
@@ -9,8 +12,8 @@ export default {
|
||||
redirect: { name: 'demo-frame-index' },
|
||||
component: layoutHeaderAside,
|
||||
children: (pre => [
|
||||
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } },
|
||||
{ path: 'html', name: `${pre}html`, component: () => import('@/pages/demo/frame/html'), meta: { ...meta, title: '静态 HTML' } },
|
||||
{ path: 'd2-doc', name: `${pre}d2-doc`, component: () => import('@/pages/demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
|
||||
{ path: 'index', name: `${pre}index`, component: _import('demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } },
|
||||
{ path: 'html', name: `${pre}html`, component: _import('demo/frame/html'), meta: { ...meta, title: '静态 HTML' } },
|
||||
{ path: 'd2-doc', name: `${pre}d2-doc`, component: _import('demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
|
||||
])('demo-frame-')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user