Releases: webpack-contrib/css-loader
Releases · webpack-contrib/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
Function
behavior forurl
andimport
options (#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
@value
at-rule in selectors (#941) (05a42e2)
BREAKING CHANGES
- minimum required nodejs version is 8.9.0
@value
at rules now support inselector
, recommends checking all@values
at-rule usage (hint: you can add prefix to all@value
at-rules, for example@value v-foo: black;
or@value m-foo: screen and (max-width: 12450px)
, and then do upgrade)- invert
{Function}
behavior forurl
andimport
options (need returntrue
when you want handleurl
/@import
and returnfalse
if not) exportLocalsStyle
option was remove in favorlocalsConvention
option, also it is accept only{String}
value (usecamelCase
value if you previously value wastrue
andasIs
if you previously value wasfalse
)exportOnlyLocals
option was remove in favoronlyLocals
optionmodules
option now can be{Object}
and allow to setupCSS Modules
options:localIdentName
option was removed in favormodules.localIdentName
optioncontext
option was remove in favormodules.context
optionhashPrefix
option was removed in favormodules.hashPrefix
optiongetLocalIdent
option was removed in favormodules.getLocalIdent
optionlocalIdentRegExp
option was removed in favormodules.localIdentRegExp
option
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
modules
option. You can setup their usinglocal
(true
is alias for this value) andglobal
(previous behaviour) value. Why it is disabled by default? A lot of developers usecss
without css modules features and they get performance problems duepostcss
plugins spend time on analyze and processing file. - resolving logic for
uls()
andimport
at-rules works the same everywhere, it does not matter whether css modules are enabled (withglobal
andlocal
module) 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
import
at-rules (#806) (4bdf08b) - handle uppercase
URL
inimport
at-rules (#818) (3ebdcd5) - inconsistent generate class names for css modules on difference os (#812) (0bdf9b7)
- reduce number of
require
forurls()
(#854) (3338656) - support deduplication of string module ids (optimization.namedModules) (#789) (e3bb83a)
- support module resolution in
composes
(#845) (453248f) - same
urls()
resolving logic formodules
(local
andglobal
) and without modules (#843) (fdcf687)
Features
- allow to disable css modules and disable their by default (#842) (889dc7f)
- disable
import
option doesn't affect oncomposes
(#822) (f9aa73c) - allow to filter
urls
(#856) (5e702e7) - allow to filter
import
at-rules (#857) (5e6034c) - emit warning on invalid
urls()
(#832) (da95db8) - added
exportOnlyLocals
option (#824) (e9327c0) - reuse
postcss
ast from other loaders (i.epostcss-loader
) (#840) (1dad1fb) - schema options (b97d997)
BREAKING CHANGES
- resolving logic for
uls()
andimport
at-rules works the same everywhere, it does not matter whether css modules are enabled (withglobal
andlocal
module) 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: false
disable all css modules features), you can return old behaviour change this onmodules: 'global'
css-loader/locals
was dropped in favorexportOnlyLocals
optionimport
option only affect onimport
at-rules and doesn't affect oncomposes
declarations- invalid
@import
at rules now emit warnings - use
postcss@7
Bonus
- code refactoring, updating deps and reusing
postcss
ast increase performance
v1.0.1
v1.0.0
2018-07-06
BREAKING CHANGES
- remove
minimize
option, usepostcss-loader
withcssnano
or useoptimize-cssnano-plugin
plugin - remove
module
option, usemodules
option instead - remove
camelcase
option, usecamelCase
option instead - remove
root
option, usepostcss-loader
withpostcss-url
plugin - remove
alias
option, useresolve.alias
feature or usepostcss-loader
withpostcss-url
plugin - update
postcss
to6
version - minimum require
nodejs
version is6.9
- minimum require
webpack
version is4