https://github.com/iantsch/cleanup-loader
Prevent webpack from emitting unwanted .js/.js.map files from certain files
https://github.com/iantsch/cleanup-loader
cleanup esnext javascript webpack-loader webpack3
Last synced: 8 months ago
JSON representation
Prevent webpack from emitting unwanted .js/.js.map files from certain files
- Host: GitHub
- URL: https://github.com/iantsch/cleanup-loader
- Owner: iantsch
- License: mit
- Created: 2018-02-24T11:49:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:30:05.000Z (over 3 years ago)
- Last Synced: 2025-02-06T12:07:39.600Z (over 1 year ago)
- Topics: cleanup, esnext, javascript, webpack-loader, webpack3
- Language: JavaScript
- Homepage: https://npm.im/cleanup-loader
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cleanup-loader
[]() []()
Prevent webpack from emitting unwanted .js/.js.map files from certain files

## Installation
```sh
$ npm i --save-dev cleanup-loader
```
## Usage
```js
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](https://twitter.com/iantsch) - [web developer](https://mbt.wien) behind this and other projects.