Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
webpack-auto-inject-version
Advanced tools
AIV can inject version number for all your bundle files (css,js,html).
Example js:
// [AIV] Build version: 1.0.10
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Example html:
<!-- [AIV] Build version: 1.0.10 -->
<!DOCTYPE html>
<html lang="en">
AIV can also auto inject your version number into html by using special code ( <{version}> ).
Example:
<span>My awesome project | <{version}></span>
$ npm install webpack-auto-inject-version --save-dev
var WebpackAutoInject = require('webpack-auto-inject-version');
module.exports = {
plugins: [
new WebpackAutoInject({
autoIncrease : boolean,
injectIntoHtml : boolean,
injectIntoHtmlRegex : regex,
injectIntoAnyFile : boolean
})
]
}
By default you don't need to pass any options, all options from Usage section are set by default.
Auto increase package.json number.
This option requires extra argument to be sent to webpack build.
Arguments: --major --minor --patch
Example for package.json run type, npm run start => ( 1.2.10 to 2.0.0 )
"version" : "1.2.10",
"scripts": {
"start": "webpack --major"
}
Default: true
Inject version number ( increased if autoIncrease is set correctly ) into HTML template
For this to work you need to place <{version}> inside your html file.
Example:
<span>My awesome project | <{version}></span>
Default: true
Regex to find your html file, where injectIntoHtml should try to find your <{version}> tag.
Default: /^index.html$/
This will inject your version file as a comment into any css,js,html file.
Default: true
FAQs
Webpack plugin for auto inject version from package.json
The npm package webpack-auto-inject-version receives a total of 3,395 weekly downloads. As such, webpack-auto-inject-version popularity was classified as popular.
We found that webpack-auto-inject-version 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.