You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
css modules are disabled by default, you need setup their use modules option. You can setup their using local (true is alias for this value) and global (previous behaviour) value. Why it is disabled by default? A lot of developers use css without css modules features and they get performance problems due postcss plugins spend time on analyze and processing file.
resolving logic for uls() and import at-rules works the same everywhere, it does not matter whether css modules are enabled (with global and local module) or not. Examples - url('image.png') as require('./image.png'), url('./image.png') as require('./image.png'), url('~module/image.png') as require('module/image.png').
resolving logic for uls() and import at-rules works the same everywhere, it does not matter whether css modules are enabled (with global and local module) or not. Examples - url('image.png') as require('./image.png'), url('./image.png') as require('./image.png'), url('~module/image.png') as require('module/image.png').
by default css modules are disabled (now modules: false disable all css modules features), you can return old behaviour change this on modules: 'global'
css-loader/locals was dropped in favor exportOnlyLocals option
import option only affect on import at-rules and doesn't affect on composes declarations
invalid @import at rules now emit warnings
use postcss@7
Bonus
code refactoring, updating deps and reusing postcss ast increase performance
The text was updated successfully, but these errors were encountered:
There are new versions of css-loader available from npm.
2.0.0
2.0.0 (2018-12-07)
The main BREAKING CHANGES:
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.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
urls()
with?#hash
(#803) (417d105)import
at-rules (#806) (4bdf08b)URL
inimport
at-rules (#818) (3ebdcd5)require
forurls()
(#854) (3338656)composes
(#845) (453248f)urls()
resolving logic formodules
(local
andglobal
) and without modules (#843) (fdcf687)Features
import
option doesn't affect oncomposes
(#822) (f9aa73c)urls
(#856) (5e702e7)import
at-rules (#857) (5e6034c)urls()
(#832) (da95db8)exportOnlyLocals
option (#824) (e9327c0)postcss
ast from other loaders (i.epostcss-loader
) (#840) (1dad1fb)BREAKING CHANGES
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')
.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@import
at rules now emit warningspostcss@7
Bonus
postcss
ast increase performanceThe text was updated successfully, but these errors were encountered: