
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fixed-webpack4-html-webpack-inline-chunk-plugin
Advanced tools
(fixed bug , now can work in webpack 4)webpack plugin to inline chunk in html webpack plugin
This is a webpack plugin that inline your chunks that is written as links or script using HtmlWebpackPlugin. It can be use to inline manifest within script tag to save a http request as described in this example. It is not limited to manifest chunk but can inline any other chunk.
This plugin requires HtmlWebpackPlugin v2.10.0 and above.
Install the plugin with npm:
$ npm i fixed-webpack4-html-webpack-inline-chunk-plugin --save-dev
inlineChunks: An array of names of chunk to inline.quiet: If set to true the plugin won't display any log information. (default value: false)//webpack.config
const InlineChunkWebpackPlugin = require('fixed-webpack4-html-webpack-inline-chunk-plugin');
module.exports = {
//.....
//.....
plugins: [
//...
//...
new InlineChunkWebpackPlugin({
inlineChunks: ['manifest']
})
//...
]
//.....
//.....
}
Webpack's runtime changes with every build. For effective long-term caching, we separate the runtime code in manifest.js. This manifest.js is very small and increases our startup time as it is a separate http request. Inlining the generated manifest.js in the index.html is a solution.
Split webpack runtime in manifest and inline it.
// for explicit vendor chunk config
{
entry: {
app: './main.js',
vendors: ['react','redux']
},
output: {
path: path.join(__dirname, "js"),
filename: "[name].[chunkhash].js",
chunkFilename: "[chunkhash].js"
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
names: ['common', 'manifest']
}),
new HtmlWebpackPlugin({
// your options,
excludeChunks: ['vendors']
}),
new InlineChunkWebpackPlugin({
inlineChunks: ['manifest']
})
]
}
This project is licensed under MIT.
FAQs
(fixed bug , now can work in webpack 4)webpack plugin to inline chunk in html webpack plugin
We found that fixed-webpack4-html-webpack-inline-chunk-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.