Skip to content

nested component doesn't get their <style> append to my ShadowRoot #4

Description

@larryval

Hello,
first : you made a great Job with this plugin !.

My concern: imagine the 'home' route with its home.vue component, home.vue has its own internal navigation with the <RouterView /> component.
The problem is that all components inside sub-route of home will have their style attached to <head> instead of my shadowRoot.
I specify that I added <style style-provider></<style> to all my *.vue component.

a snippet of my Vue app's main file (Vue V3.2 with TypeScript, Vite 2.9.13)

import allStyle from 'virtual:style-provider?query=*';
...
let targetShadow = document.getElementById(`mytargetApp`);
const shadowRoot = targetShadow.attachShadow({ mode: 'open' });
allStyle(shadowRoot).mount();
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions