1.0.0 • Published 2 years ago

@sumotto/html-href-to-relative-webpack-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

HTML Href to Relative Webpack Plugin

Webpack plugin for replace <a href="/"> to relative path in HTML files.

Installation

You can install the package as follows:

npm install @sumotto/html-href-to-relative-webpack-plugin --save-dev

# or

yarn add @sumotto/html-href-to-relative-webpack-plugin --dev

Usage

Require the plugin in your Webpack config:

const HtmlHrefToRelativePlugin = require( '@sumotto/html-href-to-relative-webpack-plugin' );

// or

import HtmlHrefToRelativePlugin from '@sumotto/html-href-to-relative-webpack-plugin';

Add the plugin to your webpack configuration's plugins array. If you use HTML Webpack Plugin) then this plugin should go after him:

plugins: [
	new HtmlWebpackPlugin(), // optional
	new HtmlHrefToRelativePlugin(),
]

License

MIT License