style-ext-html-webpack-plugin-webpack-4

1.0.3 • Public • Published

style-ext-html-webpack-plugin for webpack 4

This plugin fixed problems for style-ext-html-webpack-plugin whoes current version does not supporte webpack 4. The funtionality is to extract CSS file in inline style.

npm i --save-dev style-ext-html-webpack-plugin-webpack-4

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin-webpack-4');
 
new HtmlWebpackPlugin({
    plugins: [
        new HtmlWebpackPlugin({
            filename: 'test.html',
            template: 'src/assets/test.html'
        }),
        // this one should be placed after HtmlWebpackPlugin
        new StyleExtHtmlWebpackPlugin()
    ]
});

The output will like:

<!DOCType html>
<html>
<head>
    <!--transform inline link tag to style tag-->
    <style>body,h1,h2{margin:0;padding:0}</style> 
</head>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i style-ext-html-webpack-plugin-webpack-4

Weekly Downloads

6

Version

1.0.3

License

MIT

Unpacked Size

15.4 kB

Total Files

11

Last publish

Collaborators

  • yincheng