@porsche-design-system/components-vue
looks like this.<PorscheDesignSystemProvider>...</PorscheDesignSystemProvider>
PorscheDesignSystemProvider is calling load() of @porsche-design-system/components-js since the web
components are exactly the same. In fact, the framework specific packages like @porsche-design-system/components-vue
only provide thin wrapper components for typing, prop binding and good developer experience just like with any other Vue
component.load() is invoked, please take a look at the
PButton.<PButton>Hello</PButton>
p-button tag in the DOM. From here on the exact same things happen as described at
Important
PButton renders again and synchronizes its properties to the rendered p-button element.
What follows is, again, exactly as documented at
PButton is not needed anymore, e.g. when conditionally rendered or navigating away, the p-button element is
removed from the DOM. What happens additionally can be found at
PButton is rendered, let's see how this looks from
the perspective of network requests and how to improve them if necessary.index.htmlindex.js bundle of the Vue appregular and semi-bold weights are preloaded since they are most commonly used but this can be customized.font-family and that particular font-weight
which can lead to a phenomena called Flash of Unstyled Text (FOUT).getComponentChunkLinks({ components: ['button'] });
Hint
Conclusion
getLoaderScript() partial is pointless since there is no benefit because everything Porsche Design
System related is loaded before the Vue app itself. Therefore, the DOM is empty once the preloaded chunks are
available.