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

Use stats option to overwrite console.log behaviour #260

Closed
dangcuuson opened this Issue Oct 26, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@dangcuuson
Copy link
Contributor

dangcuuson commented Oct 26, 2017

This is a Feature Proposal

Description

Currently, the stats options in webpack.config.js seems to be ignored. No matter what I put in my webpack.config.js, the console output is the same, which I find them too verbose and annoying, especially when developing & watch. E.g:

image

I think it would be good if we can allow webpack stats config to overwrite the default behaviour.

[Update]
After digging through the source, I think the we can do it easily by updating lib/compile.js
and lib/wpwatch.js

I can make a PR if you're ok with this.

Similar or dependent issue(s):

  • Can't find any

Additional Data

  • Serverless-Webpack Version you're using: 3.1.2
  • Webpack version you're using: 3.8.1
  • Serverless Framework Version you're using: 1.23.0
@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 26, 2017

Hi @dangcuuson , thanks for the thoughts.

you're absolutely right that the stats output currently is not configurable and the two locations are the right place to have a possible configuration in (there is a 3rd one at run/watch that is used on serverless invoke local --watch but there the output is disabled completely).

I think we can let the default be as it is now (i.e. print the whole data if nothing else is specified), but if overridden in the config, that should be used.

The approach to let the stats config option override our defaults sounds good to me. I'm happy if you do a PR for the issue 😃

@HyperBrain HyperBrain added this to the 4.0.0 milestone Oct 26, 2017

HyperBrain added a commit that referenced this issue Oct 31, 2017

HyperBrain added a commit that referenced this issue Oct 31, 2017

Update examples added
Update #265

Added #260

Added release notes. Increased version.
@HyperBrain

This comment has been minimized.

Copy link
Member

HyperBrain commented Oct 31, 2017

Released with serverless-webpack@4.0.0

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