{"id":13436804,"url":"https://github.com/iyonaga/ejs-templates-loader","last_synced_at":"2025-04-13T22:56:18.021Z","repository":{"id":32933241,"uuid":"146866251","full_name":"iyonaga/ejs-templates-loader","owner":"iyonaga","description":"EJS loader module for webpack","archived":false,"fork":false,"pushed_at":"2023-01-07T06:54:25.000Z","size":459,"stargazers_count":5,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T10:18:15.086Z","etag":null,"topics":["ejs","ejs-loader","webpack","webpack-loader"],"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/iyonaga.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-08-31T08:47:47.000Z","updated_at":"2020-09-24T06:39:33.000Z","dependencies_parsed_at":"2023-01-14T22:44:27.445Z","dependency_job_id":null,"html_url":"https://github.com/iyonaga/ejs-templates-loader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyonaga%2Fejs-templates-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyonaga%2Fejs-templates-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyonaga%2Fejs-templates-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyonaga%2Fejs-templates-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyonaga","download_url":"https://codeload.github.com/iyonaga/ejs-templates-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794570,"owners_count":21162614,"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":["ejs","ejs-loader","webpack","webpack-loader"],"created_at":"2024-07-31T03:00:52.216Z","updated_at":"2025-04-13T22:56:17.997Z","avatar_url":"https://github.com/iyonaga.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ejs-templates-loader\nEJS loader module for webpack\n\n## Installation\n\n```shell\nnpm install --save ejs-templates-loader\n```\n\n## Usage\n\n### webpack.config.js\n\n```js\nmodule: {\n  rules: [\n    {\n      test: /\\.ejs$/,\n      use: {\n        loader: 'ejs-templates-loader',\n        options: {}\n      }\n    }\n  ]\n},\n\nplugins: [\n  new HtmlWebpackPlugin({\n    filename: 'index.html',\n    template: './index.ejs'\n  })\n]\n```\n\n### Advanced configuration example\n\n\n\n#### webpack.config.js\n```js\nmodule: {\n  rules: [\n    {\n      test: /\\.ejs$/,\n      use: {\n        loader: 'ejs-templates-loader',\n        options: {\n          delimiter: '$'\n        }\n      }\n    }\n  ]\n},\n\nplugins: [\n  new HtmlWebpackPlugin({\n    title: 'title',\n    filename: 'index.html',\n    template: './index.ejs'\n  })\n]\n```\n\n#### index.ejs\n```html\n\u003c！DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003e\u003c%= htmlWebpackPlugin.options.title %\u003e\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003c$- include('./_header', {foo: 'foo'}) $\u003e\n    \u003cimg src=\"\u003c%= require('./img/image.jpg') %\u003e\"\u003e\n    \u003c$- include _footer $\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Options\n- `delimiter` — Character to use with angle brackets for open/close (default: `\"%\"`)\n\n- `beautify` — Enable/Disable beautification (default: `false`)\n\n- `beautifyOptions` See [js-beautify#options](https://github.com/beautify-web/js-beautify#options) (default: `{}`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyonaga%2Fejs-templates-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyonaga%2Fejs-templates-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyonaga%2Fejs-templates-loader/lists"}