Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import StyleLoader from 'style-loader';
// TRICKY: Style Loader should not be cached because
// if it is then it doesn't load styles on the first compile.
const oldPitch = StyleLoader.pitch;
StyleLoader.pitch = function (remainingRequest) {
this.cacheable = () => {
};
return oldPitch(remainingRequest);
};
export default StyleLoader;
import StyleLoader from 'style-loader';
// TRICKY: Style Loader should not be cached because
// if it is then it doesn't load styles on the first compile.
const oldPitch = StyleLoader.pitch;
StyleLoader.pitch = function (remainingRequest) {
this.cacheable = () => {
};
return oldPitch(remainingRequest);
};
export default StyleLoader;
use() {
this._refs = this._refs + 1;
if (this._disposeTimer !== null) {
clearTimeout(this._disposeTimer);
this._disposeTimer = null;
}
if (this._remove === null) {
this._remove = addStyleToDOM([[this.uid, this.css]]);
}
return this;
}
injectStylesheet(compiledStylesheet: Array<[string, string]>): void {
if (Environment.canInject) {
injectStylesheet(compiledStylesheet);
}
}
}