All Projects → dzonatan → base-href-webpack-plugin

dzonatan / base-href-webpack-plugin

Licence: MIT license
Webpack plugin for inserting base href tag in head block

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
typescript
32286 projects

Projects that are alternatives of or similar to base-href-webpack-plugin

monaco-editor-esm-webpack-plugin
No description or website provided.
Stars: ✭ 25 (+8.7%)
Mutual labels:  webpack-plugin
generate-package-json-webpack-plugin
Generates a package.json file containing the external modules used by your webpack bundle
Stars: ✭ 59 (+156.52%)
Mutual labels:  webpack-plugin
tde-webpack-mjml-plugin
Webpack plugin for converting MJML files to HTML
Stars: ✭ 12 (-47.83%)
Mutual labels:  webpack-plugin
css-chunks-html-webpack-plugin
Injecting css chunks extracted using extract-css-chunks-webpack-plugin to HTML for html-webpack-plugin
Stars: ✭ 22 (-4.35%)
Mutual labels:  webpack-plugin
webpack2-externals-plugin
Webpack 2+ fork of Webpack-Externals-Plugin
Stars: ✭ 14 (-39.13%)
Mutual labels:  webpack-plugin
webpack-shower
🚿 Clean up, Arrange, Filter Webpack Stats
Stars: ✭ 12 (-47.83%)
Mutual labels:  webpack-plugin
loading-screen
🚥Loading screen for webpack plugin inspired by Nuxt.js's loading screen
Stars: ✭ 56 (+143.48%)
Mutual labels:  webpack-plugin
chunk-progress-webpack-plugin
Provides runtime progress events by replacing default webpack chunk loading with XHR
Stars: ✭ 17 (-26.09%)
Mutual labels:  webpack-plugin
stylelint-bare-webpack-plugin
Stylelint plugin for webpack
Stars: ✭ 15 (-34.78%)
Mutual labels:  webpack-plugin
module-mapping-webpack-plugin
Webpack plugin for mapping modules onto different files
Stars: ✭ 25 (+8.7%)
Mutual labels:  webpack-plugin
prettier-eslint-webpack-plugin
Webpack plugin for prettier-eslint which ESLint's settings is set to JavaScript Standard Style
Stars: ✭ 24 (+4.35%)
Mutual labels:  webpack-plugin
2018-package-three-webpack-plugin
[ARCHIVED] Webpack plugin to use Three.js "examples" classes
Stars: ✭ 45 (+95.65%)
Mutual labels:  webpack-plugin
amp-react-renderer-plugin
⚡Plugin makes it painless to create React component based AMP page⚡
Stars: ✭ 29 (+26.09%)
Mutual labels:  webpack-plugin
size-plugin-bot
A Github bot for size-plugin
Stars: ✭ 76 (+230.43%)
Mutual labels:  webpack-plugin
meteor-imports-webpack-plugin
Webpack plugin to import and use Meteor packages like if they were real NPM packages.
Stars: ✭ 25 (+8.7%)
Mutual labels:  webpack-plugin
webpack-stats-diff-plugin
Webpack plugin for reporting changes in bundle sizes across builds
Stars: ✭ 63 (+173.91%)
Mutual labels:  webpack-plugin
flow-webpack-plugin
A webpack plugin allowing to call Flow type checker.
Stars: ✭ 36 (+56.52%)
Mutual labels:  webpack-plugin
license-info-webpack-plugin
Making a list of package's LICENSE information for webpack
Stars: ✭ 20 (-13.04%)
Mutual labels:  webpack-plugin
inline-source-webpack-plugin
A webpack plugin to embed css/js resource in the html.
Stars: ✭ 18 (-21.74%)
Mutual labels:  webpack-plugin
mangle-css-class-webpack-plugin
Minifies and obfuscates the class names in your existing JavaScript, CSS, and HTML without any modern css modules.
Stars: ✭ 96 (+317.39%)
Mutual labels:  webpack-plugin

base-href-webpack-plugin (extension)

npm version

Extension for html-webpack-plugin to programmatically insert or update <base href="" /> tag.

Deprecation notice ⚠️

You probably don't need this plugin as html-webpack-plugin supports this feature natively.

Prerequisites

This plugin is an extension of html-webpack-plugin.
So make sure you have installed npm i --save-dev html-webpack-plugin.

Installation

For webpack v5 use latest (^3.0.0):
npm i --save-dev base-href-webpack-plugin

For webpack v4 use ^2.0.0:
npm i --save-dev base-href-webpack-plugin@2

For webpack v3 use ^1.0.0:
npm i --save-dev base-href-webpack-plugin@1

Usage

const { BaseHrefWebpackPlugin } = require('base-href-webpack-plugin');

// Add to plugins
plugins: [
  new HtmlWebpackPlugin(), // Required dependency
  new BaseHrefWebpackPlugin({ baseHref: '/' })
]

Plugin leaves your template untouched if baseHref option is not provided.

Contribution

Feel free to contribute to this project by submitting issues and/or pull requests.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].