html-webpack-inline-size-plugin

1.0.0 • Public • Published

html-webpack-inline-size-plugin

💝 Embed javascript and css source inside of html by setting the smallest file size when using webpack

travis-ci Version Dependencies License

webpack-logo

install

npm install html-webpack-inline-size-plugin --save-dev

or

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

usage

  1. specify inlineSize option in html-webpack-plugin
  2. use html-webpack-inline-size-plugin

the option inlineSource used by html-webpack-inline-source-plugin are also supported


### example

webpack.config.js

```javascript
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackInlineSizePlugin = require('html-webpack-inline-size-plugin');

const webpackConfig = {
  // ... 
  plugins: [
     new HtmlWebpackPlugin({
      inject: true,
      template: 'index.html',
      // other config options
      inlineSize: 5 * 1024 // files that size is smaller than 5kb will be inline in html
    }),
    new HtmlWebpackInlineSizePlugin()
  ]
}

license

MIT

Package Sidebar

Install

npm i html-webpack-inline-size-plugin

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • tingyuan