Skip to content

Invalid default specified for postcssOptions.config #626

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

Closed
1 of 4 tasks
Knagis opened this issue Mar 15, 2023 · 3 comments
Closed
1 of 4 tasks

Invalid default specified for postcssOptions.config #626

Knagis opened this issue Mar 15, 2023 · 3 comments

Comments

@Knagis
Copy link
Contributor

Knagis commented Mar 15, 2023

Documentation Is:

https://github.com/webpack-contrib/postcss-loader#config

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

https://github.com/webpack-contrib/postcss-loader#config specifies the default is undefined which isn't really true - if the value is undefined then https://github.com/webpack-contrib/postcss-loader/blob/master/src/index.js#L40 assumes true.

Your Proposal for Changes

Change the default in documentation from undefined to true

@Knagis
Copy link
Contributor Author

Knagis commented Mar 15, 2023

I would also suggest to highlight a recommendation to set postcssOptions in webpack config with config: false as a performance optimization. In one of my builds it seems doing this has helped me to decrease build time from 42->38 seconds (~10k TS and PostCSS modules). My postcss config was rather heavy (a func, not just an object, plugin factory, not plugin instances etc.).

@alexander-akait
Copy link
Member

Hello, yes, you are right, let's do it, do you want to send a PR?

@Knagis
Copy link
Contributor Author

Knagis commented Mar 16, 2023

PR created: #627

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