{"id":15690405,"url":"https://github.com/lovetingyuan/simple-functional-loader","last_synced_at":"2025-06-18T03:33:03.376Z","repository":{"id":33535319,"uuid":"159290550","full_name":"lovetingyuan/simple-functional-loader","owner":"lovetingyuan","description":"Use function as webpack loader option.","archived":false,"fork":false,"pushed_at":"2023-01-06T01:36:57.000Z","size":191,"stargazers_count":8,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-07T05:38:24.469Z","etag":null,"topics":["function","inline-function","loader","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovetingyuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-27T07:01:06.000Z","updated_at":"2023-12-03T05:35:39.000Z","dependencies_parsed_at":"2023-01-15T01:20:00.905Z","dependency_job_id":null,"html_url":"https://github.com/lovetingyuan/simple-functional-loader","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lovetingyuan/simple-functional-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fsimple-functional-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fsimple-functional-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fsimple-functional-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fsimple-functional-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovetingyuan","download_url":"https://codeload.github.com/lovetingyuan/simple-functional-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovetingyuan%2Fsimple-functional-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260481884,"owners_count":23015827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["function","inline-function","loader","webpack"],"created_at":"2024-10-03T18:09:01.359Z","updated_at":"2025-06-18T03:32:58.361Z","avatar_url":"https://github.com/lovetingyuan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-functional-loader\nUse function as webpack loader option\n\n[![npm version](https://img.shields.io/npm/v/simple-functional-loader.svg)](https://www.npmjs.com/package/simple-functional-loader)\n[![Build Status](https://travis-ci.org/lovetingyuan/simple-functional-loader.svg?branch=master)](https://travis-ci.org/lovetingyuan/simple-functional-loader)\n\n## install\n```bash\nnpm install simple-functional-loader --save-dev\n```\n\n## usage\n```javascript\n// webpack.config.js\nconst { createLoader } = require('simple-functional-loader')\nmodule.exports = {\n  //...\n  module: {\n    rules: [\n      {\n        test: /\\.html$/,\n        use: [\n          createLoader(function(source, map) { // must be an \"ES5\" function!\n            // use \"this\" as loaderContext\n            return processHTML(source, map) // process source code.\n          })\n        ]\n      }\n    ]\n  }\n}\n```\n\n`createLoader` will return [`UseEntry`](https://webpack.js.org/configuration/module/#useentry) object:\n```\n{\n  loader: string,\n  options: object\n}\n```\n\n## license\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovetingyuan%2Fsimple-functional-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovetingyuan%2Fsimple-functional-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovetingyuan%2Fsimple-functional-loader/lists"}