perf: 加载js优化
This commit is contained in:
parent
b98c21b009
commit
c27b6b809e
|
@ -5,24 +5,24 @@ export default {
|
|||
name: "api",
|
||||
redirect: "/api/home",
|
||||
components: {
|
||||
content: () => import(/* webpackChunkName: "api" */ '@/business/components/api/ApiTest')
|
||||
content: () => import('@/business/components/api/ApiTest')
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
name: 'fucHome',
|
||||
component: () => import(/* webpackChunkName: "api" */ '@/business/components/api/home/ApiTestHome'),
|
||||
component: () => import('@/business/components/api/home/ApiTestHome'),
|
||||
},
|
||||
{
|
||||
path: "test/:type",
|
||||
name: "ApiTestConfig",
|
||||
component: () => import(/* webpackChunkName: "api" */ '@/business/components/api/test/ApiTestConfig'),
|
||||
component: () => import('@/business/components/api/test/ApiTestConfig'),
|
||||
props: (route) => ({id: route.query.id})
|
||||
},
|
||||
{
|
||||
path: "test/list/:projectId",
|
||||
name: "ApiTestList",
|
||||
component: () => import(/* webpackChunkName: "api" */ '@/business/components/api/test/ApiTestList'),
|
||||
component: () => import('@/business/components/api/test/ApiTestList'),
|
||||
},
|
||||
{
|
||||
path: "project/:type",
|
||||
|
@ -32,12 +32,12 @@ export default {
|
|||
{
|
||||
path: "report/list/:testId",
|
||||
name: "ApiReportList",
|
||||
component: () => import(/* webpackChunkName: "api" */ '@/business/components/api/report/ApiReportList'),
|
||||
component: () => import('@/business/components/api/report/ApiReportList'),
|
||||
},
|
||||
{
|
||||
path: "report/view/:reportId",
|
||||
name: "ApiReportView",
|
||||
component: () => import(/* webpackChunkName: "api" */ '@/business/components/api/report/ApiReportView'),
|
||||
component: () => import('@/business/components/api/report/ApiReportView'),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import MsProject from "@/business/components/project/MsProject";
|
||||
|
||||
const PerformanceTest = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/PerformanceTest')
|
||||
const PerformanceTestHome = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/home/PerformanceTestHome')
|
||||
const EditPerformanceTestPlan = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/test/EditPerformanceTestPlan')
|
||||
const PerformanceTestPlan = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/test/PerformanceTestPlan')
|
||||
const PerformanceTestReport = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/report/PerformanceTestReport')
|
||||
const PerformanceChart = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/report/components/PerformanceChart')
|
||||
const PerformanceReportView = () => import(/* webpackChunkName: "performance" */ '@/business/components/performance/report/PerformanceReportView')
|
||||
const PerformanceTest = () => import('@/business/components/performance/PerformanceTest')
|
||||
const PerformanceTestHome = () => import('@/business/components/performance/home/PerformanceTestHome')
|
||||
const EditPerformanceTestPlan = () => import('@/business/components/performance/test/EditPerformanceTestPlan')
|
||||
const PerformanceTestPlan = () => import('@/business/components/performance/test/PerformanceTestPlan')
|
||||
const PerformanceTestReport = () => import('@/business/components/performance/report/PerformanceTestReport')
|
||||
const PerformanceChart = () => import('@/business/components/performance/report/components/PerformanceChart')
|
||||
const PerformanceReportView = () => import('@/business/components/performance/report/PerformanceReportView')
|
||||
|
||||
export default {
|
||||
path: "/performance",
|
||||
|
|
|
@ -4,69 +4,69 @@ export default {
|
|||
path: "/setting",
|
||||
name: "Setting",
|
||||
components: {
|
||||
content: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/Setting')
|
||||
content: () => import('@/business/components/settings/Setting')
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'user',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/User'),
|
||||
component: () => import('@/business/components/settings/system/User'),
|
||||
meta: {system: true, title: 'commons.user'}
|
||||
},
|
||||
{
|
||||
path: 'organization',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/Organization'),
|
||||
component: () => import('@/business/components/settings/system/Organization'),
|
||||
meta: {system: true, title: 'commons.organization'}
|
||||
},
|
||||
{
|
||||
path: 'systemworkspace',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/SystemWorkspace'),
|
||||
component: () => import('@/business/components/settings/system/SystemWorkspace'),
|
||||
meta: {system: true, title: 'commons.workspace'}
|
||||
},
|
||||
{
|
||||
path: 'testresourcepool',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/TestResourcePool'),
|
||||
component: () => import('@/business/components/settings/system/TestResourcePool'),
|
||||
meta: {system: true, title: 'commons.test_resource_pool'}
|
||||
},
|
||||
{
|
||||
path: 'systemparametersetting',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/system/SystemParameterSetting'),
|
||||
component: () => import('@/business/components/settings/system/SystemParameterSetting'),
|
||||
meta: {system: true, title: 'commons.system_parameter_setting'}
|
||||
},
|
||||
...requireContext.keys().map(key => requireContext(key).system),...requireContext.keys().map(key => requireContext(key).license),
|
||||
{
|
||||
path: 'organizationmember',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/organization/OrganizationMember'),
|
||||
component: () => import('@/business/components/settings/organization/OrganizationMember'),
|
||||
meta: {organization: true, title: 'commons.member'}
|
||||
},
|
||||
{
|
||||
path: 'organizationworkspace',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/organization/OrganizationWorkspace'),
|
||||
component: () => import('@/business/components/settings/organization/OrganizationWorkspace'),
|
||||
meta: {organization: true, title: 'commons.workspace'}
|
||||
},
|
||||
{
|
||||
path: 'serviceintegration',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/organization/ServiceIntegration'),
|
||||
component: () => import('@/business/components/settings/organization/ServiceIntegration'),
|
||||
meta: {organization: true, title: 'organization.service_integration'}
|
||||
},
|
||||
{
|
||||
path: 'member',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/workspace/WorkspaceMember'),
|
||||
component: () => import('@/business/components/settings/workspace/WorkspaceMember'),
|
||||
meta: {workspace: true, title: 'commons.member'}
|
||||
},
|
||||
{
|
||||
path: 'testcase/report/template',
|
||||
name: 'testCaseReportTemplate',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/workspace/TestCaseReportTemplate'),
|
||||
component: () => import('@/business/components/settings/workspace/TestCaseReportTemplate'),
|
||||
meta: {workspace: true, title: 'test_track.plan_view.report_template'}
|
||||
},
|
||||
{
|
||||
path: 'personsetting',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/personal/PersonSetting'),
|
||||
component: () => import('@/business/components/settings/personal/PersonSetting'),
|
||||
meta: {person: true, title: 'commons.personal_setting'}
|
||||
},
|
||||
{
|
||||
path: 'apikeys',
|
||||
component: () => import(/* webpackChunkName: "setting" */ '@/business/components/settings/personal/ApiKeys'),
|
||||
component: () => import('@/business/components/settings/personal/ApiKeys'),
|
||||
meta: {
|
||||
person: true,
|
||||
title: 'commons.api_keys',
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import MsProject from "@/business/components/project/MsProject";
|
||||
|
||||
const TestTrack = () => import(/* webpackChunkName: "track" */ '@/business/components/track/TestTrack')
|
||||
const TrackHome = () => import(/* webpackChunkName: "track" */ '@/business/components/track/home/TrackHome')
|
||||
const TestCase = () => import(/* webpackChunkName: "track" */ '@/business/components/track/case/TestCase')
|
||||
const TestPlan = () => import(/* webpackChunkName: "track" */ '@/business/components/track/plan/TestPlan')
|
||||
const TestCaseReview = () => import(/* webpackChunkName: "track" */ '@/business/components/track/review/TestCaseReview')
|
||||
const TestCaseReviewView = () => import(/* webpackChunkName: "track" */ '@/business/components/track/review/view/TestCaseReviewView')
|
||||
const TestPlanView = () => import(/* webpackChunkName: "track" */ '@/business/components/track/plan/view/TestPlanView')
|
||||
const TestTrack = () => import('@/business/components/track/TestTrack')
|
||||
const TrackHome = () => import('@/business/components/track/home/TrackHome')
|
||||
const TestCase = () => import('@/business/components/track/case/TestCase')
|
||||
const TestPlan = () => import('@/business/components/track/plan/TestPlan')
|
||||
const TestCaseReview = () => import('@/business/components/track/review/TestCaseReview')
|
||||
const TestCaseReviewView = () => import('@/business/components/track/review/view/TestCaseReviewView')
|
||||
const TestPlanView = () => import('@/business/components/track/plan/view/TestPlanView')
|
||||
|
||||
export default {
|
||||
path: "/track",
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
const path = require('path')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
productionSourceMap: true,
|
||||
configureWebpack: {
|
||||
devtool: 'source-map'
|
||||
},
|
||||
devServer: {
|
||||
port: 8080,
|
||||
proxy: {
|
||||
|
@ -23,5 +26,16 @@ module.exports = {
|
|||
template: "src/login/login.html",
|
||||
filename: "login.html"
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
devtool: 'source-map',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
}
|
||||
}
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('prefetch')
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue