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.
- Host: GitHub
- URL: https://github.com/klaucode/html-webpack-basepath-plugin
- Owner: klaucode
- License: mit
- Created: 2020-02-16T18:48:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-16T19:35:41.000Z (over 6 years ago)
- Last Synced: 2025-08-09T08:19:23.923Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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