goindex-theme-r/src/router/routes.js

12 lines
584 B
JavaScript
Raw Normal View History

2020-05-02 01:25:28 +08:00
// 由于懒加载页面太多的话会造成webpack热更新太慢所以开发环境不使用懒加载只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
const frameIn = [
{ path: '/:id:/*.(html|php|css|go|java|py|js|json|txt|sh|md)', component: _import('page/GoText') },
2020-05-02 13:00:29 +08:00
{ path: '/:id:/*.(mp4|webm|mkv)', component: _import('page/GoVideo') },
{ path: '/:id:/*.(bmp|jpg|jpeg|png|gif)', component: _import('page/GoImg') },
{ path: '/:id::cmd?(/?/??.*)', component: _import('page/GoList') },
2020-05-02 01:25:28 +08:00
]
export default frameIn