0.1.3 • Published 6 years ago

html-imgwh-loader v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

An HTML loader that adds width and height attributes to all img tags in the HTML file.

Converts

<img src="logo.png"/>

into

<img src="logo.png" width="126" height="130"/>

Installation

npm install html-imgwh-loader

Usage

rules: [
    {
        test: /\.pug$/,
        use: [
            {
                loader: 'html-loader'
            },
            {
                loader: 'html-imgwh-loader'
            },
            {
                loader: 'pug-html-loader',
                options: {
                    pretty: true,
                    doctype: 'html'
                }
            }
        ]
    }
  ]