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

Not saving to file for webpack 3 #32

Closed
t47io opened this issue Jan 14, 2020 · 2 comments
Closed

Not saving to file for webpack 3 #32

t47io opened this issue Jan 14, 2020 · 2 comments

Comments

@t47io
Copy link

t47io commented Jan 14, 2020

Using webpack 3.12.0. Even with { writeFile: true } in options, no json file is written to disk. I tracked down the problem is here:
https://github.com/GoogleChromeLabs/size-plugin/blob/master/src/index.mjs#L158

For webpack 3, compiler.options.mode is undefined, which leads to no-op when writeToDisk: https://github.com/GoogleChromeLabs/size-plugin/blob/master/src/index.mjs#L118-L131

@t47io
Copy link
Author

t47io commented Jan 14, 2020

It seems there is no mode info at all for webpack 3 options, so one way to fix is to add optional mode override in SizePlugin(options). Ideas? @developit

@developit
Copy link
Collaborator

developit commented Jan 29, 2021

Added in 3.0.0.

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

No branches or pull requests

2 participants