{"id":16347719,"url":"https://github.com/privatenumber/code-inject-loader","last_synced_at":"2025-11-09T04:30:32.342Z","repository":{"id":57202186,"uuid":"180908406","full_name":"privatenumber/code-inject-loader","owner":"privatenumber","description":"Inject code to certain files","archived":false,"fork":false,"pushed_at":"2020-10-02T04:05:31.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T13:17:12.954Z","etag":null,"topics":["append","code","inject","loader","prepend","transform","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/privatenumber.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":"2019-04-12T01:42:55.000Z","updated_at":"2020-12-30T20:18:25.000Z","dependencies_parsed_at":"2022-09-17T15:01:58.649Z","dependency_job_id":null,"html_url":"https://github.com/privatenumber/code-inject-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcode-inject-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcode-inject-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcode-inject-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcode-inject-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privatenumber","download_url":"https://codeload.github.com/privatenumber/code-inject-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239566739,"owners_count":19660349,"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":["append","code","inject","loader","prepend","transform","webpack"],"created_at":"2024-10-11T00:45:11.841Z","updated_at":"2025-11-09T04:30:32.308Z","avatar_url":"https://github.com/privatenumber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-inject-loader\n\u003e Inject code to certain files\n\n\n## How to use\nAdd as a loader rule to configure which files the loader should inject code into.\n\nwebpack.config.js\n```\nmoule.exports = {\n\t...,\n\n\tmodule: {\n\t\trules: [\n\t\t\t{\n\t\t\t\ttest: /src/,\n\t\t\t\tloader: 'code-inject-loader',\n\t\t\t\toptions: {\n\t\t\t\t\tprepend: `console.log('Hello Im in every file');`\n\t\t\t\t},\n\t\t\t},\n\t\t\t...\n\t\t]\n\t},\n\n\t...\n}\n```\n\n### Options\n- *prepend \u003cstring\u003e* Add code to the beginning of the file\n- *append \u003cstring\u003e* Add code to the bottom of the file\n- *transform(source) \u003cfunction\u003e* Function to make changes to the source code of the file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fcode-inject-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivatenumber%2Fcode-inject-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fcode-inject-loader/lists"}