Open dum3ng opened 5 years ago
The import is a function which return a promise. so we can do stuff after the dynamic component is loaded.
import
import('some/component') .then(()=> console.log('component loaded') )
Also we can use meta info in the import to tell webpack to split code to another chunk.
import(/* webpackChunkName: about */ 'path/to/component/or/file')
The
import
is a function which return a promise. so we can do stuff after the dynamic component is loaded.Also we can use meta info in the import to tell webpack to split code to another chunk.