html-inline-css-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

html-inline-css-webpack-plugin

MIT Licence PRs Welcome npm version

Convert external style sheet(<link rel="stylesheet"/>) to internal style sheet(<style>...<style/>).

Require mini-css-extract-plugin and html-webpack-plugin

Install

NPM

npm install html-inline-css-webpack-plugin -D

Yarn

yarn add html-inline-css-webpack-plugin -D

Minimal example

const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HTMLInlineCSSWebpackPlugin = require("html-inline-css-webpack-plugin").default;

module.exports = {
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].css",
      chunkFilename: "[id].css"
    }),
    new HtmlWebpackPlugin(),
    new HTMLInlineCSSWebpackPlugin(),
  ],
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          MiniCssExtractPlugin.loader,
          "css-loader"
        ]
      }
    ]
  }
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.11.233,113latest
1.11.0-alpha.10alpha
1.10.0-beta.00beta

Version History

VersionDownloads (Last 7 Days)Published
1.11.233,113
1.11.111,593
1.11.07,485
1.11.0-alpha.10
1.10.1282
1.10.0168
1.10.0-beta.00
1.9.12
1.9.06
1.8.1185
1.8.080
1.8.0-beta.00
1.7.00
1.7.0-beta.20
1.7.0-beta.10
1.7.0-beta.00
1.6.034
1.5.135
1.5.00
1.4.01
1.3.20
1.3.10
1.3.00
1.2.10
1.2.00
1.1.00
1.0.00
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i html-inline-css-webpack-plugin@0.1.1

Version

0.1.1

License

MIT

Unpacked Size

7.71 kB

Total Files

6

Last publish

Collaborators

  • runjuu