1.0.0 • Published 5 years ago

cleanup-loader v1.0.0

Weekly downloads
21
License
MIT
Repository
github
Last release
5 years ago

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

ParameterTypeDescription
testregexgenerated .js/.js.map files from tested files are prevented from emitting

License

MIT

Credits

@iantsch - web developer behind this and other projects.

1.0.0

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago