html-webpack-assets-path-plugin

1.0.7 • Public • Published

Html Webpack Assets Path Plugin

Alert js or css path in the html file.Works with newer html-webpack-plugin versions

npm version Build Status js-semistandard-style

Configuration

  1. Install via npm i -D html-webpack-assets-path-plugin
  2. Add to your webpack config AFTER HtmlWebpackPlugin
    var HtmlWebpackAssetsPathPlugin = require('html-webpack-assets-path-plugin');
    ...
    plugins: [
        new HtmlWebpackPlugin({
            filename: join(OUTPUT_DIR, './dist/index.html'),
            // ..
        }),
        new HtmlWebpackAssetsPathPlugin({
            // specify css path
            cssPath: './dist'
            // specify js path
            jsPath: './dist'
        })
    ]

Testing

Testing is done via ts-node and mocha. Test files can be found in /test. Just run npm test after installing to see the tests run.

Readme

Keywords

Package Sidebar

Install

npm i html-webpack-assets-path-plugin

Weekly Downloads

0

Version

1.0.7

License

ISC

Unpacked Size

6.55 kB

Total Files

5

Last publish

Collaborators

  • wangshaolin1116