{"id":35474675,"url":"https://github.com/rstackjs/rsbuild-plugin-ejs","last_synced_at":"2026-04-01T21:50:32.380Z","repository":{"id":254587343,"uuid":"846344675","full_name":"rstackjs/rsbuild-plugin-ejs","owner":"rstackjs","description":"An Rsbuild plugin to provide support for the EJS template engine.","archived":false,"fork":false,"pushed_at":"2026-03-27T04:33:14.000Z","size":131,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-28T00:59:53.494Z","etag":null,"topics":["ejs","rsbuild","rsbuild-plugin","rspack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rstackjs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-23T02:31:50.000Z","updated_at":"2026-03-27T04:33:16.000Z","dependencies_parsed_at":"2024-08-24T15:32:02.645Z","dependency_job_id":"0a3899d5-556e-4f9c-9efe-14ab2bb7991b","html_url":"https://github.com/rstackjs/rsbuild-plugin-ejs","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"fd2f529464f8b05dcd8451eda49bb2573b58f803"},"previous_names":["rspack-contrib/rsbuild-plugin-ejs","rstackjs/rsbuild-plugin-ejs"],"tags_count":4,"template":false,"template_full_name":"rstackjs/rsbuild-plugin-template","purl":"pkg:github/rstackjs/rsbuild-plugin-ejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-ejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-ejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-ejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-ejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstackjs","download_url":"https://codeload.github.com/rstackjs/rsbuild-plugin-ejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-ejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: 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":["ejs","rsbuild","rsbuild-plugin","rspack"],"created_at":"2026-01-03T12:00:40.055Z","updated_at":"2026-04-01T21:50:32.324Z","avatar_url":"https://github.com/rstackjs.png","language":"TypeScript","readme":"# rsbuild-plugin-ejs\n\nAn Rsbuild plugin to provide support for the [EJS](https://github.com/mde/ejs) template engine.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/rsbuild-plugin-ejs\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/rsbuild-plugin-ejs?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\nInstall:\n\n```bash\nnpm add rsbuild-plugin-ejs -D\n```\n\nAdd plugin to your `rsbuild.config.ts`:\n\n```ts\n// rsbuild.config.ts\nimport { pluginEjs } from \"rsbuild-plugin-ejs\";\n\nexport default {\n  plugins: [pluginEjs()],\n};\n```\n\n### Using EJS Templates\n\nAfter the plugin registration is completed, Rsbuild will automatically parse template files with the `.ejs` extension and compile them using the EJS template engine.\n\nFor example, first create a `src/index.ejs` file, and point to that file using `html.template`:\n\n```ts title=\"rsbuild.config.ts\"\nexport default {\n  html: {\n    template: \"./src/index.ejs\",\n  },\n};\n```\n\nThen, you can use EJS syntax in the `index.ejs` template:\n\n```html\n\u003c!-- Input --\u003e\nHello \u003c%= foo %\u003e!\n\n\u003c!-- Output --\u003e\nHello Rsbuild!\n```\n\nRefer to the [EJS documentation](https://github.com/mde/ejs) for more details.\n\n## Options\n\n### ejsOptions\n\nUsed to set the compilation options for EJS. For detailed options, please refer to the [EJS API Reference](https://ejs.co/#docs).\n\n- **Type:** `import('ejs').Options`\n- **Default:**\n\n```ts\nconst defaultOptions = {\n  filename,\n};\n```\n\n- **Example:**\n\n```ts\npluginEjs({\n  ejsOptions: {\n    delimiter: \"|\",\n  },\n});\n```\n\n## License\n\n[MIT](./LICENSE).\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Rsbuild Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-ejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstackjs%2Frsbuild-plugin-ejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-ejs/lists"}