1.0.1 • Published 5 years ago

@ianwalter/callback-loader v1.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
5 years ago

@ianwalter/callback-loader

A Webpack loader that receives content and passes it to a callback function specified in the loader options

Installation

npm install @ianwalter/callback-loader --save

Usage

rules: [
  {
    test: /\.js$/,
    loader: '@ianwalter/callback-loader',
    options: {
      callback: content => {
        expect(content).toMatchSnapshot()
        done()
      }
    }
  }
]

License

Apache 2.0 with Commons Clause - See LICENSE

 

Created by Ian Walter