1.0.0 • Published 6 years ago

html-webpack-inline-size-plugin v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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

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