html-webpack-inline-asset-plugin
v1.1.3
Published
> Inline all the css and js assets in the html where the `<script>`, `<link>` tags that contain the `inline` attribute.
Downloads
2
Readme
html-webpack-inline-asset-plugin
Inline all the css and js assets in the html where the
<script>
,<link>
tags that contain theinline
attribute.
Installation
npm install --save html-webpack-inline-asset-plugin
Basic Usage
Require the plugin in your webpack config:
var HtmlWebpackInlineAssetPlugin = require('html-webpack-inline-asset-plugin');
Add the plugin to your webpack config as follows:
plugins: [
new HtmlWebpackPlugin({inject: false}),
new HtmlWebpackInlineAssetPlugin()
]
Add the tag to your html template as follows:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" inline>
</head>
<body>
<script inline></script>
</body>
</html>
License
This project is licensed under MIT.