0.0.4 • Published 6 years ago
inline-style-ext-html-webpack-plugin v0.0.4
Inline Style Extension for the HTMLWebpackPlugin
This package extends the html-webpack-plugin functionality by inlining existing styles to HTML elements using inline-css.
You might want to use this to automate email generation with webpack.
The following input provided by the HTMLWebpackPlugin:
.my-class {
color:red;
}<div class="my-class"></div>will result in
<div style="color: red;"></div>Installation
Install the plugin with npm:
$ npm install --save-dev inline-style-ext-html-webpack-pluginInstall the plugin with yarn:
$ yarn add --dev inline-style-ext-html-webpack-pluginBasic Usage
Require the plugin in your webpack config:
const InlineStyleExtHtmlWebpackPlugin = require('inline-style-ext-html-webpack-plugin');Add the plugin to your webpack config as follows:
{
...
plugins: [
new HtmlWebpackPlugin(),
new InlineStyleExtHtmlWebpackPlugin(),
]
...
}