The css-loader-with-hooks
is a css-loader
fork with access to internal loader data from webpack config
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
use: [
"style-loader",
{
loader: "css-loader-with-hooks",
options: {
onExports : (exports, loaderContext) => {
}
}
],
},
],
},
};