We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d767948 + b236155 commit ebbef87Copy full SHA for ebbef87
index.js
@@ -83,11 +83,18 @@ module.exports = function (source, map) {
83
}
84
85
// Allow plugins to add or remove postcss plugins
86
- plugins = this._compilation.applyPluginsWaterfall(
87
- 'postcss-loader-before-processing',
88
- [].concat(plugins),
89
- params
90
- );
+ if ( this._compilation ) {
+ plugins = this._compilation.applyPluginsWaterfall(
+ 'postcss-loader-before-processing',
+ [].concat(plugins),
+ params
91
+ );
92
+ } else {
93
+ loader.emitWarning(
94
+ 'this._compilation is not available thus ' +
95
+ '`postcss-loader-before-processing` is not supported'
96
97
+ }
98
99
postcss(plugins).process(source, opts)
100
.then(function (result) {
0 commit comments