html-webpack-inline-asset-plugin

1.1.3 • Public • Published

html-webpack-inline-asset-plugin

Inline all the css and js assets in the html where the <script>, <link> tags that contain the inline 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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i html-webpack-inline-asset-plugin

      Weekly Downloads

      7

      Version

      1.1.3

      License

      MIT

      Unpacked Size

      5.26 kB

      Total Files

      5

      Last publish

      Collaborators

      • samciu