Releases: webpack/css-loader
Releases · webpack/css-loader
v3.0.0
3.0.0 (2019-06-11)
Bug Fixes
- avoid the "from" argument must be of type string error (#908) (e5dfd23)
- invert
Functionbehavior forurlandimportoptions (#939) (e9eb5ad) - properly export locals with escaped characters (#917) (a0efcda)
- property handle non css characters in localIdentName (#920) (d3a0a3c)
Features
- modules options now accepts object config (#937) (1d7a464)
- support
@valueat-rule in selectors (#941) (05a42e2)
BREAKING CHANGES
- minimum required nodejs version is 8.9.0
@valueat rules now support inselector, recommends checking all@valuesat-rule usage (hint: you can add prefix to all@valueat-rules, for example@value v-foo: black;or@value m-foo: screen and (max-width: 12450px), and then do upgrade)- invert
{Function}behavior forurlandimportoptions (need returntruewhen you want handleurl/@importand returnfalseif not) exportLocalsStyleoption was remove in favorlocalsConventionoption, also it is accept only{String}value (usecamelCasevalue if you previously value wastrueandasIsif you previously value wasfalse)exportOnlyLocalsoption was remove in favoronlyLocalsoptionmodulesoption now can be{Object}and allow to setupCSS Modulesoptions:localIdentNameoption was removed in favormodules.localIdentNameoptioncontextoption was remove in favormodules.contextoptionhashPrefixoption was removed in favormodules.hashPrefixoptiongetLocalIdentoption was removed in favormodules.getLocalIdentoptionlocalIdentRegExpoption was removed in favormodules.localIdentRegExpoption
v2.1.1
v2.1.0
v2.0.2
v2.0.1
v2.0.0
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
v1.0.1
v1.0.0
2018-07-06
BREAKING CHANGES
- remove
minimizeoption, usepostcss-loaderwithcssnanoor useoptimize-cssnano-pluginplugin - remove
moduleoption, usemodulesoption instead - remove
camelcaseoption, usecamelCaseoption instead - remove
rootoption, usepostcss-loaderwithpostcss-urlplugin - remove
aliasoption, useresolve.aliasfeature or usepostcss-loaderwithpostcss-urlplugin - update
postcssto6version - minimum require
nodejsversion is6.9 - minimum require
webpackversion is4