Skip to content

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

License

Notifications You must be signed in to change notification settings

klaucode/html-webpack-basepath-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published