0.0.6 • Published 4 years ago

html-webpack-basepath-plugin v0.0.6

Weekly downloads
18
License
ISC
Repository
github
Last release
4 years ago

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.

  npm i --save-dev html-webpack-basepath-plugin
  yarn add --dev html-webpack-basepath-plugin

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

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:

<script src="{$basePath}/dist/app.js" ...

...and {$basePath} will be replaced by the base url path by the templating engine.

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago