-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
What problem does this feature solve?
At the moment we can create libs and web-components. In the course of my current project the companies architecture has shifted from a giant app to wanting to manage each "module" of the application with a separate npm package. Within these packages one thing that will be exported is a router config that will then be registered within a new Vue Router instance on the main application. This works, until you try to lazy load a component into the router config. Webpack cannot resolve the chunks.
In the description of async web components you say " When targeting multiple web components, the bundle may become quite large, and the user may only use a few of the components your bundle registers. The async web component mode produces a code-split bundle with a small entry file that provides the shared runtime between all the components, and registers all the custom elements upfront. The actual implementation of a component is then fetched on-demand only when an instance of the corresponding custom element is used on the page: "
This feature would simply replicate this to a common / umd module
What does the proposed API look like?
vue-cli-service build --target lib-async --name