The docs indicate that I should be able to manually apply the polyfill to a shadow root by importing a named export function called cqfill:
import { cqfill } from 'cqfill'
cqfill() /* cqfill(document); cqfill(shadowRoot) */
However, when I attempted to do this, Webpack gave me an error saying that cqfill had no exports. I ended up having to do the following in order to import the cqfill function:
import { cqfill } from 'node_modules/cqfill/export/cqfill.cjs'
cqfill(shadowRoot)
I ended up using another library that worked with styled-components but wanted to post this issue here in case it affects others as well. :)
The docs indicate that I should be able to manually apply the polyfill to a shadow root by importing a named export function called
cqfill:However, when I attempted to do this, Webpack gave me an error saying that cqfill had no exports. I ended up having to do the following in order to import the
cqfillfunction:I ended up using another library that worked with
styled-componentsbut wanted to post this issue here in case it affects others as well. :)