1.0.0 • Published 6 years ago
cleanup-loader v1.0.0
cleanup-loader
Prevent webpack from emitting unwanted .js/.js.map files from certain files
Installation
$ npm i --save-dev cleanup-loader
Usage
module.exports = {
module : {
rules:[
// Useage with text-extract plugin
{
test: /\.scss$/,
use: ExctractSass.extract({
use: [
// ... after all style loaders
{
loader: 'cleanup-loader',
options: {
test: /\.s?css$/
}
}]
})
},{
// Useage with image optimization
test: /\.(jpe?g|png|gif|svg|eot|ttf|woff2?)$/,
use: [
// ... after all your image loaders
{
loader: 'cleanup-loader',
options: {
test: /\.(jpe?g|png|gif|svg|eot|ttf|woff2?)$/
}
}]
}]
}
}
Options
Parameter | Type | Description |
---|---|---|
test | regex | generated .js/.js.map files from tested files are prevented from emitting |
License
MIT
Credits
@iantsch - web developer behind this and other projects.