An open API service indexing awesome lists of open source software.

https://github.com/klaucode/html-webpack-basepath-plugin

Plugin which make possible to set basePath option in html-webpack-plugin.
https://github.com/klaucode/html-webpack-basepath-plugin

Last synced: 5 months ago
JSON representation

Plugin which make possible to set basePath option in html-webpack-plugin.

Awesome Lists containing this project

README

          

# Html Webpack Basepath Plugin

Plugin for simple enhancement html webpack plugin for make possibility to define basePath option. basePath option will overwrite the path for all the JS and CSS files injected by webpack-html-plugin into html file.

```bash
npm i --save-dev html-webpack-basepath-plugin
```

```bash
yarn add --dev html-webpack-basepath-plugin
```

Plugin solves problem with JS/CSS basePath on any templating systems, like on following example:

```js
new HtmlWebpackPlugin({
filename: ROOT_PATH + '/app/presenters/templates/@layout.latte',
template: ROOT_PATH + '/app/assets/@layout.latte',
basePath: '{$basePath}/dist/'
}),
```

...it will inject into HTML:
```js