Preload css only with getLinkTags

Author: cjwiseman11Created Oct 14, 2025Updated Oct 14, 2025

Hello

Just curious if there's a "simple" way to get preload link tags for CSS only and not both JS and CSS tags?

Currently I'm using this approach:

  const cssLinkTags = extractor
    .getLinkTags()
    .split('\n')
    .filter(tag => tag.includes('as="style"'))
    .join('');

But it's not as nice as just using getLinkTags() for example - the problem with getLinkTags is it gives preload links for JS and CSS.

Thanks

Source: gregberge/loadable-components