html-webpack-inline-size-plugin
v1.0.0
Published
Embed javascript and css source inline into html by setting smallest size when using webpack
Downloads
2
Maintainers
Readme
html-webpack-inline-size-plugin
💝 Embed javascript and css source inside of html by setting the smallest file size when using webpack
install
npm install html-webpack-inline-size-plugin --save-dev
or
yarn add html-webpack-inline-size-plugin -D
usage
- specify
inlineSize
option inhtml-webpack-plugin
- 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