{"id":19526537,"url":"https://github.com/dzonatan/base-href-webpack-plugin","last_synced_at":"2025-04-26T10:31:18.410Z","repository":{"id":10098407,"uuid":"64473937","full_name":"dzonatan/base-href-webpack-plugin","owner":"dzonatan","description":"Webpack plugin for inserting base href tag in head block","archived":false,"fork":false,"pushed_at":"2022-07-20T06:49:03.000Z","size":230,"stargazers_count":22,"open_issues_count":8,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T02:02:29.079Z","etag":null,"topics":["base-href","base-tag","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":null,"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/dzonatan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-07-29T10:54:58.000Z","updated_at":"2023-01-06T21:44:55.000Z","dependencies_parsed_at":"2022-07-22T18:32:49.768Z","dependency_job_id":null,"html_url":"https://github.com/dzonatan/base-href-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzonatan%2Fbase-href-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzonatan%2Fbase-href-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzonatan%2Fbase-href-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzonatan%2Fbase-href-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzonatan","download_url":"https://codeload.github.com/dzonatan/base-href-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972764,"owners_count":21516423,"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":["base-href","base-tag","webpack","webpack-plugin"],"created_at":"2024-11-11T01:10:36.668Z","updated_at":"2025-04-26T10:31:18.134Z","avatar_url":"https://github.com/dzonatan.png","language":"JavaScript","readme":"# base-href-webpack-plugin (extension)\r\n\r\n[![npm version](https://badge.fury.io/js/base-href-webpack-plugin.svg)](https://badge.fury.io/js/base-href-webpack-plugin)\r\n\r\nExtension for [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) to programmatically insert or update `\u003cbase href=\"\" /\u003e` tag.\r\n\r\n# Deprecation notice ⚠️\r\n\r\nYou probably don't need this plugin as `html-webpack-plugin` supports this [feature natively](https://github.com/jantimon/html-webpack-plugin#base-tag).\r\n\r\n# Prerequisites\r\n\r\nThis plugin is an extension of [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin).  \r\nSo make sure you have installed `npm i --save-dev html-webpack-plugin`.\r\n\r\n# Installation\r\n\r\nFor webpack v5 use latest (^3.0.0):  \r\n`npm i --save-dev base-href-webpack-plugin`\r\n\r\nFor webpack v4 use ^2.0.0:  \r\n`npm i --save-dev base-href-webpack-plugin@2`\r\n\r\nFor webpack v3 use ^1.0.0:  \r\n`npm i --save-dev base-href-webpack-plugin@1`\r\n\r\n# Usage\r\n\r\n```javascript\r\nconst { BaseHrefWebpackPlugin } = require('base-href-webpack-plugin');\r\n\r\n// Add to plugins\r\nplugins: [\r\n  new HtmlWebpackPlugin(), // Required dependency\r\n  new BaseHrefWebpackPlugin({ baseHref: '/' })\r\n]\r\n```\r\n\r\nPlugin **leaves your template untouched** if `baseHref` option is not provided.\r\n\r\n# Contribution\r\n\r\nFeel free to contribute to this project by submitting issues and/or pull requests.\r\n\r\n# License\r\n\r\nMIT\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzonatan%2Fbase-href-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzonatan%2Fbase-href-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzonatan%2Fbase-href-webpack-plugin/lists"}