
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
webpack-html-script-insert-loader
Advanced tools
Webpack loader to insert a script tag into HTML
This is a loader for Webpack. It adds a script to the specified html file, either in the <head>
or <body>
elements, and with an option to add attributes as well.
Usage: add to the module.rules array in webpack.config.js
file.
Required options:
src
: The full path of the script.
Optional options:
location
: A string, one of either head
or body
. Defaults to 'body'. Script tag will be added immediately before the closing tag of the specified block.
attribs
: A string, to be added to the <script>
tag.
module: {
rules: [
{
test: /index.html/,
use: [
{
loader: 'html-loader'
},
{
loader: 'webpack-html-script-insert-loader',
options: {
src: 'https://.../script.js',
location: 'head',
attribs: 'async'
}
},
]
},
...
FAQs
Webpack loader to insert a script tag into HTML
The npm package webpack-html-script-insert-loader receives a total of 2 weekly downloads. As such, webpack-html-script-insert-loader popularity was classified as not popular.
We found that webpack-html-script-insert-loader 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.