
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.
@wjtools/version-webpack-plugin
Advanced tools
一个简易的 webpack 版本号自动更新插件
首先,您需要安装 @wjtools/version-webpack-plugin:
$ yarn add @wjtools/version-webpack-plugin --save-dev
然后将插件添加到您的 webpack 配置。例如:
vue.config.js
configureWebpack: config => {
if (isProd) {
// 自动更新 package.json 中的版本号
const VersionWebpackPlugin = require('@wjtools/version-webpack-plugin')
config.plugins.push(
new VersionWebpackPlugin({
// file: 'package.json', // 指定版本号所在文件,默认:'package.json'
// version: '1.0.0', // 指定版本号,默认取 file 指定文件中的版本号
// mode: 'increment', // 更新模式:increment-递增(默认);timestamp-时间戳
}),
)
}
},
每次打包会生成新的递增的版本号,直接导入即可使用,例如:
main.js
import { version } from '../package'
版本号兼容 1.x.x、x.x、x 等写法
FAQs
webpack 版本号自动更新插件
We found that @wjtools/version-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.