NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1932 most downloaded on npm
PostCSS loader for webpack
Last release 7 months ago
15 Feb 2026
Ships unpredictably
gaps range from 2 weeks to 1.5 years
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
88 releases · first in 2014
update peer dependency for @rspack/core v2
8.2.0 (2025-09-01) Features update jiti from v1 to v2
One column per quarter.
respect default when loading postcss esm configs
add @rspack/core as an optional peer dependency
minimum supported Node.js version is 18.12.0
klona for postcss options (#658) (e754c3f)cosmiconfig to version 8.2 (684d265)do not crash if pkg.(d|devD)ependencies unset
perf: avoid using klona for postcss options
use cause to keep original errors and warnings
warning and error serialization
use jiti for typescript configurations
### 7.2.4 (2023-04-04) ### Bug Fixes * memory leak
### 7.2.3 (2023-04-03) ### Bug Fixes * ts-node loading
### 7.2.2 (2023-04-03) ### Bug Fixes * cannot find module 'ts-node'
### 7.2.1 (2023-04-03) ### Bug Fixes * cosmiconfig typescript loader
add support for TypeScript based configs
## 7.1.0 (2023-03-16) ### Features * deps: update cosmiconfig
support ESM version of postcss.config.js and postcss.config.mjs
unexpected failing on CSS syntax error
minimum supported Node.js version is 14.15.0
### 6.2.1 (2021-11-26) ### Bug Fixes * watching configuration
## 6.2.0 (2021-10-13) ### Features * add link field in schema
do not swallow exception from postcss
allow String value for the "implementation" option
minimum supported Node.js version is 12.13.0
add support for dir-dependency message type
support ecma modules for the 'parser', 'stringifier' and 'syntax' options
added support for registering context, build and missing dependencies (#518) (9ce4972), please read docs
minimum supported webpack version is 5
add support for dir-dependency message type
added the implementation option
partial compatibility with postcss-cli, added api.env (alias for api.mode) and api.options (contains options from the postcssOptions options), please
postcss-cli, added api.env (alias for api.mode) and api.options (contains options from the postcssOptions options), please look at the example for more details (#498) (84a9c46)schema-utils### 4.0.4 (2020-10-09) ### Chore * update schema-utils
## 4.0.3 (2020-10-02) ### Bug Fixes * PostCSS 8 plugin loading (e1b82fe) * error and warning messages
### 4.0.2 (2020-09-15) ### Bug Fixes * compatibility with postcss@8
source map generation with the map option for postcss
Object syntax for the plugin option is soft deprecated, please migrate on Array syntax (plugins: ['postcss-present-env', ['cssnano', options]])
Node.js version is 10.13webpack version is 4postcss was moved to peerDependencies, you need to install postcssPostCSS (plugins/syntax/parser/stringifier) options was moved to the postcssOptions option, please look at docssourceMap default value depends on the compiler.devtool optioninline value was removed for the sourceMap option, please use { map: { inline: true, annotation: false } } to achieve thissourcescss-loader/file-loader/raw-loader to inject code inside bundleexec option was renamed to the execute optionconfig option doesn't support Object type anymore, config.path and config.ctx options were removedFunction notation (previously config.ctx) was changed, now it contains { file, mode, webpackLoaderContext }webpack to webpackLoaderContextplugins option from the config and options are merged (0eb5aaf)postcssOptions options can be Functiondefault export for plugins (#465) (3d32c35)map option from loader options and config (#458) (98441ff)ident option for loaderObject syntax for the plugin option is soft deprecated, please migrate on Array syntax (plugins: ['postcss-present-env', ['cssnano', options]])Node.js version is 10.13webpack version is 4postcss was moved to peerDependencies, you need to install postcssPostCSS (plugins/syntax/parser/stringifier) options was moved to the postcssOptions option, please look at docssourceMap default value depends on the compiler.devtool optioninline value was removed for the sourceMap option, please use { map: { inline: true, annotation: false } } to achieve thissourcescss-loader/file-loader/raw-loader to inject code inside bundleexec option was renamed to the execute optionconfig option doesn't support Object type anymore, config.path and config.ctx options were removedFunction notation (previously config.ctx) was changed, now it contains { file, mode, webpackLoaderContext }webpack to webpackLoaderContextplugins option from the config and options are merged (0eb5aaf)postcssOptions options can be Functiondefault export for plugins (#465) (3d32c35)map option from loader options and config (#458) (98441ff)ident option for loaderObject syntax for the plugin option is soft deprecated, please migrate on Array syntax (plugins: ['postcss-preset-env', ['cssnano', options]])<a name="3.0.0"></a>
meta.ast) (f34954f)warnings as an instance of {Error} (8ac6fb5)ValidationError messages (549ea08)node >= v6.0.0<a name="2.1.6"></a>
index: add ast version (meta.ast)
Bug Fixesmeta.ast) (f34954f)warnings as an instance of {Error} (8ac6fb5)ValidationError messages (549ea08)ChoresBREAKING CHANGESnode >= v6.0.0package: config memory leak, updates postcss-load-config v1.2.0...2.0.0 (dependencies)
Bug Fixespostcss-load-config v1.2.0...2.0.0 (dependencies) (0547b12)index: remove sourceMap warning
restore loader object in postcss config context
options: revert additionalProperties: false to keep semver
<a name="2.1.2"></a>
options: disallow additional properties and add ident to validation
Bug Fixesindex: don't set to value (options)
<a name="2.1.0"></a>
result.root) && Messages (result.messages) as metadata to other loaders (#322) (56232e7)<a name="2.0.10"></a>
index: continue watching after dependency {Error}
index: copy loader options before modifying
index: filter ident (options.ident)
lib/options: handle {Object} return (options.plugins)
Bug Fixessanitizing from and to options (postcss.config.js)
Bug Fixesallow to pass an {Object} (options.parser)
regression with options.plugins {Function} (webpack.config.js)
Bug Fixesoptions.plugins {Function} (webpack.config.js) (#229) (dca52a9)index: postcss.config.js not resolved correctly (options.config)
Bug Fixesindex: don't fail on sourceMap: false && emit a warning instead, when previous map found (options.sourceMap)
Bug FixessourceMap: false && emit a warning instead, when previous map found (options.sourceMap) (159b66a)index: 'No PostCSS Config found' (options.config)
index: 'Cannot create property prev on boolean false' (options.sourceMap)
Bug Fixesprev on boolean false' (options.sourceMap) (c4f0064)prev on boolean false' (options.sourceMap) (c4f0064)<a name="2.0.0"></a>
index: add ctx, ctx.file, ctx.options
Featuresoptions.configctx, ctx.file, ctx.options (0dceb2c)webpack.config.js
{
test: /\.css$/
use: [
{
loader: 'postcss-loader',
options: {
config: {
ctx: {
cssnext: {...options}
}
}
}
]
}
postcss.config.js
module.exports = ({ file, options, env }) => ({
parser: file.extname === '.sss' ? 'sugarss' : false,
plugins: {
'postcss-import': { root: file.dirname },
'cssnext': options.cssnext ? options.cssnext : false
'cssnano': env === 'production' ? { safe: true } : false
}
})
Options Validation ErrorRefactorSyntax ErrorModule Export (JS Module)ℹ️ This is especially useful for Angular 2 Users
webpack.config.js
{
test: /\.scss$/
- use: [ 'raw-loader', 'sass-loader' ]
+ use: [ 'postcss-loader', 'sass-loader' ]
}
BREAKING CHANGESnode =< v4.0.0 (LTS)ctx.webpack (Loader API) => use ctx.file, ctx.env, ctx.optionsoptions.packpostcss-loader-before-processing)options.config => use options.config.path/options.config.ctx (ctx.options)webpack.config.js
{
test: /\.css$/
use: [
{
loader: 'postcss-loader',
options: {
- config: 'path/to/postcss.config.js'
+ config: {
+ ctx: {},
+ path: 'path/to/postcss.config.js'
+ }
}
}
]
}
Remove postcss-loader-before-processing warning (by Michael Ciniawsky).
postcss-loader-before-processing warning (by Michael Ciniawsky).Fix deprecated warning (by Xiaoyu Zhai).
Fix conflict with CLI --config argument (by EGOIST).
--config argument (by EGOIST).Nothing published for this version
Watch postcss.config.js for changes (by Michael Ciniawsky).
postcss.config.js for changes (by Michael Ciniawsky).Your coding agent can read these notes before it upgrades. Set up the MCP server →