Skip to content

What style-loaders expects as input? #552

@ParSal123

Description

@ParSal123

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

Hi,
In the docs, it reads

It's recommended to combine style-loader with the css-loader

but it doesn't say anything about alternatives. I'm trying to learn how this whole webpack pipeline fits together. From what I can tell (based on this, bunch of stackoverflow questions: 1, 2, 3, 4 and probably more) css-loader takes the css files (after everything else like sass, postcss, etc have done their work and right before style-loader) and outputs js which are then given to style-loader. Finally, based on configuration, the output is then javascript which injects the style in DOM.
What EXACTLY is style-loader expecting as input? I tried to input css files and it didn't work.

I'm asking this for my own curiosity, but if someone were to actually write another css-loader to work with style-loader, there is no documentation for it.

Your Proposal for Changes

Write documentation!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions