# html-webpack-basepath-plugin

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

Latest version **0.0.6** (published 2020-02-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install html-webpack-basepath-plugin
pnpm add html-webpack-basepath-plugin
yarn add html-webpack-basepath-plugin
bun add html-webpack-basepath-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-02-16 |
| First published | 2020-02-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | acqsk |
| Maintainers | acqsk |
| Keywords | html-webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/html-webpack-basepath-plugin
- Repository: https://github.com/acqsk/html-webpack-basepath-plugin
- Homepage: https://github.com/acqsk/html-webpack-basepath-plugin#readme
- Issues: https://github.com/acqsk/html-webpack-basepath-plugin/issues
- npm.io page: https://npm.io/package/html-webpack-basepath-plugin

## Dependencies (1)

- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^4.0.0-beta.11

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2020-02-16
- 0.0.5 — 2020-02-16
- 0.0.4 — 2020-02-16
- 0.0.3 — 2020-02-02
- 0.0.2 — 2020-02-02
- 0.0.1 — 2020-02-02

## 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
<script src="{$basePath}/dist/app.js" ...
```

...and `{$basePath}` will be replaced by the base url path by the templating engine.

---
_Source: https://npm.io/package/html-webpack-basepath-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
