Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve documentation of Compilation and Compiler #3148

Copy link
Copy link
Open
@elyobo

Description

@elyobo
Issue body actions

Feature to document

Compilation and Compiler API.

The Plugin API documentation is very good when it comes to the availability of hooks, but provides very little documentation of the Compilation and Compiler objects which are so heavily used in them - and the docs even say that

Among the two most important resources while developing plugins are the compiler and compilation objects. Understanding their roles is an important first step in extending the webpack engine.

There are some limited docs on the Compiler (which is not referenced from the plugin docs), but it does not cover most of the available methods or properties of the compiler. There doesn't appear to be even this much information on the Compilation, even though examples show some functionality (e.g. the "writing a plugin" section contains an example that writes to compilation.assets but there's no explanation of the assets property and how that works).

The issue template mentions a PR to the feature, but as it's a core part of webpack I'm not really sure what to reference!

Author(s)

@sokra, @TheLarkInn, and @ooflorent come up first in the contributors list for Compilation.js and Compiler.js but there are many contributors.

Additional information

While low level "this is what this method/property is and what it does" is useful, some sort of "if you're trying to do something like X, then try looking at Y method and Z property" might also be useful. I've ended up solving my particular problem (force a recompile of a given file whenever another given file changes) but in what I suspect is totally the wrong way - I figured out how to mess with the fileTimestamps entry for the file I wanted to force to recompiled, but I suspect that if I could somehow inform webpack of the dependency between the two then it would handle the rest itself.

[ ] I am willing to work on this issue and submit a pull request.

I cannot, because I don't understand them :D

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.