@ianwalter/callback-loader

1.0.1 • Public • Published

@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

Package Sidebar

Install

npm i @ianwalter/callback-loader

Weekly Downloads

2

Version

1.0.1

License

SEE LICENSE IN LICENSE

Unpacked Size

3.78 kB

Total Files

4

Last publish

Collaborators

  • ianwalter