⚠ BREAKING CHANGES
- minimum supported
Node.js
version is10.13
- minimum supported
webpack
version is4
postcss
was moved topeerDependencies
, you need to installpostcss
PostCSS
(plugins
/syntax
/parser
/stringifier
) options was moved to thepostcssOptions
option, please look at docssourceMap
default value depends on thecompiler.devtool
option- the
inline
value was removed for thesourceMap
option, please use{ map: { inline: true, annotation: false } }
to achieve this - source maps contain absolute paths in
sources
- loader output only CSS, so you need to use
css-loader
/file-loader
/raw-loader
to inject code inside bundle exec
option was renamed to theexecute
option- the
config
option doesn't supportObject
type anymore,config.path
andconfig.ctx
options were removed - argument in the config for
Function
notation (previouslyconfig.ctx
) was changed, now it contains{ file, mode, webpackLoaderContext }
- loader context in the config was renamed from
webpack
towebpackLoaderContext
Features
- message API for emit assets (#443) (e966ab9)
- reuse AST from other loaders (#468) (9b75888)
- allows to use config and loader options together, options from the loader takes precedence over the config, the
plugins
option from the config and options are merged (0eb5aaf) postcssOptions
options can beFunction
Bug Fixes
- compatibility with webpack@5 (#437) (ed50491)
default
export for plugins (#465) (3d32c35)- avoid mutations of loader options and config (#470) (cad6f07)
- respect the
map
option from loader options and config (#458) (98441ff)
Notes
- you don't need
ident
option for loader Object
syntax for theplugin
option is soft deprecated, please migrate onArray
syntax (plugins: ['postcss-present-env', ['cssnano', options]]
)