Skip to content

iantsch/cleanup-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cleanup-loader

licence tag

Prevent webpack from emitting unwanted .js/.js.map files from certain files

cleanup-loader

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.

About

Prevent webpack from emitting unwanted .js/.js.map files from certain files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •