New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-functional-loader

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-functional-loader

forked from `simple-functional-loader`, fix some bugs and rewrite by typescript

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-94.52%
Maintainers
1
Weekly downloads
 
Created
Source

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
}

Keywords

FAQs

Package last updated on 24 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc