Installation
You must be running webpack (1.x or 2.x) )on node 4+.
Install the plugin with npm:
$ npm install --save-dev script-ext-inline-html-webpack-plugin
Basic Usage
Add the plugin to your webpack config as follows:
const ScriptExtInlineHtmlWebpackPlugin = ; plugins: append: ` (function() { console.log('hello world'); }()); `
will append inline <script>
tag with given content into generated body of html.
very simple and easy...
Preppend
const ScriptExtInlineHtmlWebpackPlugin = ; plugins: prepend: ` (function() { console.log('hello world'); }()); `