Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] webpack-cli as a module #226

Closed
sompylasar opened this issue Dec 22, 2017 · 1 comment
Closed

[Discussion] webpack-cli as a module #226

sompylasar opened this issue Dec 22, 2017 · 1 comment

Comments

@sompylasar
Copy link

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

@evenstensberg
Copy link
Member

Hi @sompylasar , we're closing this. We're adding a monorepo later, which will make this a bit better for you, as you can hook up this functionality yourself!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants