'Storybook : How to inject Vue Custom Element styles

I have a Vue 3.2 Custom Elements project, perfectly running via -ce extension and webpack config

`chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
      .tap(options => ({
        ...options,
        compilerOptions: {
          // treat any tag that starts with ion- as custom elements
          isCustomElement: tag => tag.startsWith('ce-')
        }
      }))
  }`

But, once a component is added to Storybook, the style part on my Single File Components does not get injected in Shadow DOM. No style at all (unless javascript imported from separate .css file).

Thanks for your help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source