Closed mhubertm closed 3 years ago
Can You please prepare CodeSandbox with example?
@karol-f here you are: https://codesandbox.io/s/vue-custom-element-with-external-library-e35z6
I see that element created by external library does not add scopeId attribute - thats why styles are not applied.
SOLUTION
Indeed there was issue with importing external styles
was
<style scoped src="../../node_modules/vue-loading-skeleton/dist/vue-loading-skeleton.css">
should be just
<style src="../../node_modules/vue-loading-skeleton/dist/vue-loading-skeleton.css">
I've try to look at it later, but now I assume you just have to usenit like e.g. store
.
Please look at e.g.
https://github.com/karol-f/vue-custom-element/issues/177#issuecomment-529488381
or
https://github.com/karol-f/vue-custom-element/issues/32#issuecomment-315058917
I would like to import some other library like vue-loading-skeleton which has own components, CSS. How to use them with shadow DOM?
main.js
Then usage - unfortunately it does not work. I have tried to run it on the example project "vue-custom-element-shadow-examples"
I see that element added by library with class pu-skeleton didn't added attribute data-v-4ed355a8![image](https://user-images.githubusercontent.com/17861205/104937265-d9030480-59ad-11eb-8504-d96875c8e673.png)