Skip to content

Documentation: Missing important information #535

Open
@SetTrend

Description

@SetTrend

Documentation is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

From my perspective, the documentation is missing crucial information.

First of all, it isn't clear that this loader is about. It "exports HTML as string". Where is that string stored? Where are we in the processing pipeline when html-loader finishes? What if html-loader is the only loader ran for *.html?

The sources section doesn't explain the sources.list.type and sources.list.filter attributes.

In the sources section it reads:

By default every loadable attribute (for example - <img src="image.png">) is imported (const img = require('./image.png') or new URL("./image.png", import.meta.url)).

… in HTML?? What is the result? And example of the resulting conversion content is missing.

In the esModule section it reads:

By default, html-loader generates JS modules that use the ES modules syntax.
If you want to generate CommonJS modules instead (e.g., module.exports =), set:

… again, in HTML?? What is the result? And example of the resulting conversion content is missing.

"Export into HTML files" is suggesting an interesting option for transforming HTML source, but then loses track by …

  1. mentioning non-existing "extract loader"s
  2. the example introduces two distinct test rules, while not explaining why.

Your Proposal for Changes

Please comb through the documentation and fix the above mentioned issues.

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