Skip to content

[Discussion] webpack-cli as a module #226

Description

@sompylasar

If webpack-cli adds on top of raw webpack some value in the shape of self-contained functions like "add" or "serve", not only arg-passing glue, then maybe it makes sense to make these functions available and importable as a library.

Examples:

  • require('webpack-cli').add(otherArgs) // -> Promise<WebpackCliAddResult>
  • require('webpack-cli').serve(otherArgs) // -> Promise<WebpackCliServerInstance>.

Alternatives:

  • spawn a webpack CLI process with the args, parse output.

Pros:

  • working in the same memory space: not passing string streams around and having access to the pre-configured Webpack objects.

Cons:

  • additional API surface.

Started here https://twitter.com/sompylasar/status/943993394115657728

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions