Plugin to inline WebPack runtime chunks when using html-webpack-plugin
This plugin automatically inlines Webpack’s runtime chunks. It requires html-webpack-plugin
This plugin was inspired by html-webpack-inline-runtime-plugin and does pretty much the same but differently.
There are a few differences, though:
npm install --save-dev hwp-inline-runtime-chunk-plugin
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { HwpInlineRuntimeChunkPlugin } = require('hwp-inline-runtime-chunk-plugin');
module.exports = {
optimization: {
runtimeChunk: 'single'
},
plugins: [
new HtmlWebpackPlugin(),
new HwpInlineRuntimeChunkPlugin({ removeSourceMap: true })
]
};
The plugin currently has only one configuration option:
removeSourceMap
(Boolean, the default is false
): whether to remove the link to the source map from the inlined source