{"library":"simple-functional-loader","title":"simple-functional-loader","description":"Allows using a JavaScript function as a Webpack loader configuration option. Version 1.2.1 simplifies custom inline loaders by wrapping a function into a loader path and options. The package is stable but has seen infrequent updates, with v1.1.2 fixing a security issue. Most development happens in the webpack ecosystem itself.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install simple-functional-loader"],"cli":null},"imports":["import { createLoader } from 'simple-functional-loader'","const { createLoader } = require('simple-functional-loader')","import source from '!simple-functional-loader!./file.txt'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nconst { createLoader } = require('simple-functional-loader');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.txt$/,\n        use: createLoader(function(source) {\n          // This function runs as a webpack loader.\n          // 'this' is the loader context.\n          return source.toUpperCase();\n        })\n      }\n    ]\n  }\n};","lang":"javascript","description":"Demonstrates wrapping a custom function as a webpack loader using createLoader.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}