Skip to content

Block internals: Pre- and post-processing hooks #25

@andywer

Description

@andywer

As @exon pointed out in #17 it might be beneficial to enable webpack blocks to define post-processing functions. That could allow you to define constants multiple times in multiple blocks, but eventually get a single webpack.DefinePlugin instance.

Another use case is the dev-server block which is currently being changed (#21). It adds a dev-server entry point to every chunk in the entry object. Right now this means that the dev-server is used after setting all your entry points. A post-processing step defined by dev-server would allow you to use your entry and dev-server blocks in random order.

A pre-processing might be desirable to add custom mime types before any the blocks are run.

Open for discussion :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions