
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.
rollup-plugin-computed
Advanced tools
Oftentimes it's handy to compute some data at build time, like querying an API endpoint, so that it's faster for the client. This plugin makes it really simple.
yarn add -D rollup-plugin-computed
# or using npm
npm i -D rollup-plugin-computed
// rollup.config.js or vite.config.js
import computed from 'rollup-plugin-computed';
const computers = {
test() {
return { hello: 'world' };
},
image: {
// bundle file, even though nothing in the app imports it
alwaysBuild: true,
type: 'asset', // chunk by default
fileExt: 'svg', // required for assets
// will be saved to dist/image.svg (rollup applies image-hash.svg by default)
fileName: 'image.svg',
fn() {
return '<svg>...</svg>';
}
}
};
export default {
plugins: [computed({ computers })]
};
You can access the computed data like this in your app:
import data from 'test.computed';
console.log(data);
// { hello: 'world' }
More more info, head over to the documentation.
FAQs
Compute data during build time.
The npm package rollup-plugin-computed receives a total of 0 weekly downloads. As such, rollup-plugin-computed popularity was classified as not popular.
We found that rollup-plugin-computed 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.