{"id":27168,"library":"netpack-rollup","title":"netpack-rollup","description":"NetPack-rollup is a host module that integrates Rollup as a bundler within the NetPack build pipeline, leveraging Microsoft.AspNetCore.NodeServices for ASP.NET Core interoperability. Current version 1.0.40 is stable but sees no active development. It is a niche tool for ASP.NET Core projects that need Rollup bundling, with TypeScript source and transpiled JavaScript output. Differentiators: tight coupling with .NET ecosystem, unlike standalone Rollup wrappers.","status":"maintenance","version":"1.0.40","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install netpack-rollup","lang":"bash","label":"npm"},{"cmd":"yarn add netpack-rollup","lang":"bash","label":"yarn"},{"cmd":"pnpm add netpack-rollup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core bundler dependency","package":"rollup","optional":false},{"reason":"Bridge to .NET runtime","package":"Microsoft.AspNetCore.NodeServices","optional":false}],"imports":[{"note":"ESM default import is primary; CommonJS require also works but may lack type definitions.","wrong":"var netpackRollup = require('netpack-rollup')","symbol":"default","correct":"import netpackRollup from 'netpack-rollup'"},{"note":"Named export for the host class, not default.","wrong":"import RollupHost from 'netpack-rollup'","symbol":"RollupHost","correct":"import { RollupHost } from 'netpack-rollup'"},{"note":"Factory function; use named import in ESM.","wrong":"const { createRollupHost } = require('netpack-rollup')","symbol":"createRollupHost","correct":"import { createRollupHost } from 'netpack-rollup'"}],"quickstart":{"code":"import { createRollupHost } from 'netpack-rollup';\n\nconst host = createRollupHost({\n  rollupConfig: {\n    input: 'src/index.js',\n    output: { dir: 'dist', format: 'esm' }\n  },\n  nodeServices: {\n    options: { /* Add NodeServices options */ }\n  }\n});\n\nhost.bundle().then(() => console.log('Bundle complete')).catch(err => console.error(err));","lang":"typescript","description":"Shows how to create a Rollup host instance with required configuration and invoke bundling."},"warnings":[{"fix":"Pin rollup to version 1.x or use an alternative bundler host.","message":"Requires specific version of rollup (^1.0.0) - incompatible with newer rollup versions.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to JavaScriptServices alternatives or using a different approach.","message":"Depends on deprecated Microsoft.AspNetCore.NodeServices package; may not work with .NET 5+.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Evaluate if the functionality is still needed and look for modern replacements.","message":"Package has not been updated in 3+ years; consider it in maintenance mode.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always provide a valid NodeServices instance in the host configuration.","message":"NodeServices initialization is required and must be passed in options; missing will cause runtime errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install rollup@^1.0.0 --save-dev","cause":"Rollup is not installed as a peer dependency.","error":"Error: Cannot find module 'rollup'"},{"fix":"Ensure NodeServices is properly configured and passed to createRollupHost.","cause":"Host creation failed due to missing or invalid NodeServices.","error":"TypeError: Cannot read property 'bundle' of undefined"},{"fix":"Provide a valid rollupConfig object with 'input' and 'output' properties.","cause":"Missing rollupConfig in the options object.","error":"Error: rollupConfig is required"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}