正在显示
6 个修改的文件
包含
10 行增加
和
6 行删除
| ... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
| 23 | ["env", { | 23 | ["env", { |
| 24 | "modules": false | 24 | "modules": false |
| 25 | }], | 25 | }], |
| 26 | - "stage-0" | 26 | + "stage-3" |
| 27 | ] | 27 | ] |
| 28 | }, | 28 | }, |
| 29 | "web": { | 29 | "web": { |
| ... | @@ -31,9 +31,9 @@ | ... | @@ -31,9 +31,9 @@ |
| 31 | ["env", { | 31 | ["env", { |
| 32 | "modules": false | 32 | "modules": false |
| 33 | }], | 33 | }], |
| 34 | - "stage-0" | 34 | + "stage-3" |
| 35 | ] | 35 | ] |
| 36 | } | 36 | } |
| 37 | }, | 37 | }, |
| 38 | - "plugins": ["transform-runtime"] | 38 | + "plugins": ["transform-runtime","dynamic-import-webpack"] |
| 39 | } | 39 | } | ... | ... |
此文件的差异被折叠,
点击展开。
| ... | @@ -67,6 +67,7 @@ | ... | @@ -67,6 +67,7 @@ |
| 67 | "babel-core": "^6.26.3", | 67 | "babel-core": "^6.26.3", |
| 68 | "babel-eslint": "^8.2.3", | 68 | "babel-eslint": "^8.2.3", |
| 69 | "babel-loader": "^7.1.4", | 69 | "babel-loader": "^7.1.4", |
| 70 | + "babel-plugin-dynamic-import-webpack": "^1.1.0", | ||
| 70 | "babel-plugin-istanbul": "^4.1.6", | 71 | "babel-plugin-istanbul": "^4.1.6", |
| 71 | "babel-plugin-transform-runtime": "^6.23.0", | 72 | "babel-plugin-transform-runtime": "^6.23.0", |
| 72 | "babel-preset-env": "^1.7.0", | 73 | "babel-preset-env": "^1.7.0", | ... | ... |
| ... | @@ -41,7 +41,7 @@ export default { | ... | @@ -41,7 +41,7 @@ export default { |
| 41 | reject(err) | 41 | reject(err) |
| 42 | return false | 42 | return false |
| 43 | } | 43 | } |
| 44 | - reslove(number) | 44 | + resolve(number) |
| 45 | }) | 45 | }) |
| 46 | }) | 46 | }) |
| 47 | }, | 47 | }, |
| ... | @@ -54,7 +54,7 @@ export default { | ... | @@ -54,7 +54,7 @@ export default { |
| 54 | reject(err) | 54 | reject(err) |
| 55 | return false | 55 | return false |
| 56 | } | 56 | } |
| 57 | - reslove(number) | 57 | + resolve(number) |
| 58 | }) | 58 | }) |
| 59 | }) | 59 | }) |
| 60 | } | 60 | } | ... | ... |
| ... | @@ -8,7 +8,9 @@ export default new Router({ | ... | @@ -8,7 +8,9 @@ export default new Router({ |
| 8 | { | 8 | { |
| 9 | path: '/', | 9 | path: '/', |
| 10 | name: 'landing-page', | 10 | name: 'landing-page', |
| 11 | - component: require('@/components/LandingPage').default | 11 | + // component: require('@/components/LandingPage').default |
| 12 | + // component: () => import('@/components/LandingPage') | ||
| 13 | + component: resolve => require(['@/components/LandingPage'], resolve) | ||
| 12 | }, | 14 | }, |
| 13 | { | 15 | { |
| 14 | path: '*', | 16 | path: '*', | ... | ... |
-
请 注册 或 登录 后发表评论