v2.0.0
·
462 commits
to master
since this release
2.0.0 (2018-12-07)
The main BREAKING CHANGES:
- css modules are disabled by default, you need setup their use
modulesoption. You can setup their usinglocal(trueis alias for this value) andglobal(previous behaviour) value. Why it is disabled by default? A lot of developers usecsswithout css modules features and they get performance problems duepostcssplugins spend time on analyze and processing file. - resolving logic for
uls()andimportat-rules works the same everywhere, it does not matter whether css modules are enabled (withglobalandlocalmodule) or not. Examples -url('image.png')asrequire('./image.png'),url('./image.png')asrequire('./image.png'),url('~module/image.png')asrequire('module/image.png').
Bug Fixes
- broken unucode characters (#850) (f599c70)
- correctly processing
urls()with?#hash(#803) (417d105) - don't break loader on invalid or not exists url or import token (#827) (9e52d26)
- don't duplicate import with same media in different case (#819) (9f66e33)
- emit warnings on broken
importat-rules (#806) (4bdf08b) - handle uppercase
URLinimportat-rules (#818) (3ebdcd5) - inconsistent generate class names for css modules on difference os (#812) (0bdf9b7)
- reduce number of
requireforurls()(#854) (3338656) - support deduplication of string module ids (optimization.namedModules) (#789) (e3bb83a)
- support module resolution in
composes(#845) (453248f) - same
urls()resolving logic formodules(localandglobal) and without modules (#843) (fdcf687)
Features
- allow to disable css modules and disable their by default (#842) (889dc7f)
- disable
importoption doesn't affect oncomposes(#822) (f9aa73c) - allow to filter
urls(#856) (5e702e7) - allow to filter
importat-rules (#857) (5e6034c) - emit warning on invalid
urls()(#832) (da95db8) - added
exportOnlyLocalsoption (#824) (e9327c0) - reuse
postcssast from other loaders (i.epostcss-loader) (#840) (1dad1fb) - schema options (b97d997)
BREAKING CHANGES
- resolving logic for
uls()andimportat-rules works the same everywhere, it does not matter whether css modules are enabled (withglobalandlocalmodule) or not. Examples -url('image.png')asrequire('./image.png'),url('./image.png')asrequire('./image.png'),url('~module/image.png')asrequire('module/image.png'). - by default css modules are disabled (now
modules: falsedisable all css modules features), you can return old behaviour change this onmodules: 'global' css-loader/localswas dropped in favorexportOnlyLocalsoptionimportoption only affect onimportat-rules and doesn't affect oncomposesdeclarations- invalid
@importat rules now emit warnings - use
postcss@7
Bonus
- code refactoring, updating deps and reusing
postcssast increase performance