@sumotto/html-href-to-relative-webpack-plugin
v1.0.0
Published
Webpack plugin for replace <a href='/'> to relative path in HTML files.
Downloads
3
Maintainers
Readme
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 --devUsage
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
