File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,11 @@ const Foo = () => import('./Foo.vue')
30
30
// const Foo = resolve => require(['./Foo.vue'], resolve)
31
31
32
32
// If you want to group a number of components that belong to the same
33
- // nested route in the same async chunk, you will need to use
34
- // require.ensure. The 3rd argument is the chunk name they belong to -
35
- // modules that belong to the same chunk should use the same chunk name.
36
- // For more details see https://webpack.js.org/guides/code-splitting-require/
37
- const Bar = resolve => require . ensure ( [ ] , ( ) => resolve ( require ( './Bar.vue' ) ) , '/bar' )
38
- const Baz = resolve => require . ensure ( [ ] , ( ) => resolve ( require ( './Baz.vue' ) ) , '/bar' )
33
+ // nested route in the same async chunk, you can use a special comment
34
+ // to indicate a chunk name for the imported module. (note this requires
35
+ // webpack 2.4.0+)
36
+ const Bar = ( ) => import ( /* webpackChunkName: "/bar" */ './Bar.vue' )
37
+ const Baz = ( ) => import ( /* webpackChunkName: "/bar" */ './Baz.vue' )
39
38
40
39
const router = new VueRouter ( {
41
40
mode : 'history' ,
You can’t perform that action at this time.
0 commit comments