
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
rollup-plugin-node-keep-module
Advanced tools
nodejs应用使用rollup打包的时候,不是所有的代码都可以正常打包成一个bundle,比如有循环引用的代码。 因此可以把有问题的包单独定义出来,则build的时候不会把包代码打包进去,同时会在output.dir里面生成一个package.json, 来包含这些包。
nodejs应用使用rollup打包的时候,不是所有的代码都可以正常打包成一个bundle,比如有循环引用的代码。 因此可以把有问题的包单独定义出来,则build的时候不会把包代码打包进去,同时会在output.dir里面生成一个package.json, 来包含这些包。
使用docker进行部署的时候,可以只安装该package.json里面定义的包(一般比较少),可以极大减少镜像的大小。
import resolve from '@rollup/plugin-node-resolve' import commonjs from '@rollup/plugin-commonjs' import json from '@rollup/plugin-json' import keep from 'rollup-plugin-node-keep-module' export default { input: ['src/server.js'], output: { dir: 'dist', format: 'cjs', exports: 'auto', }, plugins: [json(), resolve({ preferBuiltins: true, }), commonjs(), keep({ modules: ['winston', 'winston-daily-rotate-file'], })], }
FAQs
nodejs应用使用rollup打包的时候,不是所有的代码都可以正常打包成一个bundle,比如有循环引用的代码。 因此可以把有问题的包单独定义出来,则build的时候不会把包代码打包进去,同时会在output.dir里面生成一个package.json, 来包含这些包。
The npm package rollup-plugin-node-keep-module receives a total of 2 weekly downloads. As such, rollup-plugin-node-keep-module popularity was classified as not popular.
We found that rollup-plugin-node-keep-module 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.