Skip to content

Documentation should explicitly mention that the plugin will add link for extracted CSS file if dynamically loaded. #760

@hasan-wajahat

Description

@hasan-wajahat

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

I have spent couple of days trying to figure out why the styles that I was extracting using this excellent plugin were not being added to my document. Because I have a SSR site (built using larvel + larave-mix) so I don't have plugins like html-webpack-plugin. Which means the link attributes are never added.

I do know that there is this note:
Note: It's only applied to dynamically loaded css chunks, if you want to modify link attributes inside html file, please using html-webpack-plugin
But this is not enough and is very missable.

Your Proposal for Changes

I recommend that the note be made more visible similar to warnings about using ECMA features and it's wording made more explicit. That way people will know exactly what to expect with the plugin and all of it will be less magical.

Ideally I would love an option by which link could be inserted similarly to how links are inserted for dynamically loaded CSS. That is the exact use case I have but I think there are no plans to support that feature. I do hope it would be considered as it will make things for people like me easier who want to break CSS in to smaller chunks and load them directly through JS.

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