0.1.4 • Published 6 months ago

create-functional-loader v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

create-functional-loader

This is a fork of simple-functional-loader but rewrite with Typescript for TypeStrong !

Use function as webpack loader option

Install

<npm|yarn|pnpm> i -D create-functional-loader

Usage

// webpack.config.js
const { createLoader } = require('create-functional-loader')
module.exports = {
  //...
  module: {
    rules: [
      {
        test: /\.html$/,
        use: [
          createLoader(function(source, map) { // must be an "ES5" function!
            // use "this" as loaderContext
            return processHTML(source, map) // process source code.
          })
        ]
      }
    ]
  }
}

createLoader function will return UseEntry object:

{
  loader: string,
  options: object,
  ident: string
}
0.1.2

6 months ago

0.1.1

6 months ago

0.1.4

6 months ago

0.1.3

6 months ago

0.1.0

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago