#611·critical

Dynamically included stylesheets

Author: rellafellaCreated Jan 9, 2025Updated Jun 1, 2026

I have a project that use some dynamically included stylesheets from styles that are conditionally included for very page specific components.

I am running into an issue that because the template itself doesn't include this stylesheet with <link rel="stylesheet" ...> but rather it's being inserted via JS (don't worry I understand that this process could do with some improvement).

Even though my critical css is generating correctly, I am left with this warning for each css file that isn't found as a <link rel="stylesheet" ...> Warning: Missing base path. Consider 'base' option. https://goo.gl/PwvFVb

Related: https://github.com/nystudio107/rollup-plugin-critical/issues/1