perf: use modules only if explicitly set #497
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
Already have.
If relevant, did you update the README?
After accept.
Summary
Now
css-loader
it is not loader forcss
, many project don't usecss-modules
for their project, but seems (https://github.com/webpack-contrib/css-loader/blob/master/lib/processCss.js#L152) they are use always. We spend a lot of time onpostcss-modules-*
, even if I setmodules: false
. I think this is completely wrong and many issue about performance probably related to this. Right name for this loader iscss-modules-loader
.postcss-loader
in v2 (i hope we can release it faster) wants to abandoncss-loader
, allow use onlypostcss-loader
handlecss
and etc stuff (url, imports and etc). In fact, this is the realcss-loader
, It is simple, does not contain any logic.What we can do?
css-loader
(css-modules-loader
) v1 andpostcss-loader
v2 (fix performance for project don't usecss-modules
).css-modules
(urls, improts and etc stuff) topostcss-loader
.css-loader
in favorcss-modules-loader
.css-modules
, clear logic forpostcss-loader
andcss-modules-loader
, separation of issues - related tocss-modules
incss-modules-loader
, related tocss
inpostcss-loader
)Ref about
postcss-loader
v2
: webpack-contrib/postcss-loader#177Does this PR introduce a breaking change?
Should not.
Other information
Not required.