{"id":44521633,"url":"https://github.com/y8n/inline-template-loader","last_synced_at":"2026-02-13T17:43:02.003Z","repository":{"id":57274185,"uuid":"91296831","full_name":"y8n/inline-template-loader","owner":"y8n","description":"a webpack loader to inline template as string","archived":false,"fork":false,"pushed_at":"2017-05-15T05:01:55.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T05:51:37.148Z","etag":null,"topics":["inline-templates","loader","template","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/y8n.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-15T05:00:03.000Z","updated_at":"2023-03-08T04:16:08.000Z","dependencies_parsed_at":"2022-09-17T10:12:57.456Z","dependency_job_id":null,"html_url":"https://github.com/y8n/inline-template-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/y8n/inline-template-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y8n%2Finline-template-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y8n%2Finline-template-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y8n%2Finline-template-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y8n%2Finline-template-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y8n","download_url":"https://codeload.github.com/y8n/inline-template-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y8n%2Finline-template-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29413642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["inline-templates","loader","template","webpack"],"created_at":"2026-02-13T17:43:01.937Z","updated_at":"2026-02-13T17:43:01.998Z","avatar_url":"https://github.com/y8n.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inline-template-loader\n\n## Install\n\n```\nnpm install inline-template-loader\n```\n\n## Usage\n\n```javascript\n// webpack.conf.js\n\nmodule: {\n  rules:[{\n    test: /\\.js$/,\n    loader: 'inline-template-loader'\n  }]\n}\n\n```\n\n## Output\n\n```javascript\n// index.js\nfunction foo(){\n  return __inline('./template.html');\n}\n```\n\n```html\n// template.html\n\u003cdiv class=\"template\"\u003e\n  \u003ch1\u003eHelloWorld\u003c/h1\u003e\n\u003c/div\u003e\n```\n\n```javascript\n// output.js\nfunction foo(){\n  return '\u003cdiv class=\"template\"\u003e\u003ch1\u003eHelloWorld\u003c/h1\u003e\u003c/div\u003e';\n}\n```\n\n## options\n\n```javascript\n// webpack.conf.js\n\nmodule: {\n  rules:[{\n    test: /\\.js$/,\n    loader: 'inline-template-loader',\n    options: {\n      pattern: /__template(/    // 正则\n      replcement: function(m){  // 替换方法\n        return m.slice(1);\n      }\n    }\n  }]\n}\n\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy8n%2Finline-template-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy8n%2Finline-template-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy8n%2Finline-template-loader/lists"}