log-loader
v0.1.8
Published
loader for debugging
Downloads
36
Readme
log-loader
npm install --save-dev log-loader
Via webpack config (recommended)
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'log-loader?id=after-css&showSource=true',
'css-loader',
'log-loader?id=before-css&showSource=true',
]
}
]
}
}
Options may passed via query params too.
Defaults
{
loader: 'log-loader',
options: {
id: '',
showIndex: false,
showSource: false,
showPitch: false,
showNextLoader: false,
showPrevLoader: false,
// string sizes
pad: {
id: 15,
index: 4,
loader: 15,
file: 35
},
// only option params, this = loader context
callback: function (source) { return source; },
callbackPitch: function (remainingRequest, precedingRequest, data) {}
}
}