Registry / web-framework / netpack-rollup

netpack-rollup

JSON →
library1.0.40jsnpmunverified

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.

npm install netpack-rollup
INSTALL
IMPORT
SIG · NETPACK-ROLLUP
N
netpack-rollup
web-frameworkjavascriptv1.0.40
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import netpackRollup from 'netpack-rollup'
var netpackRollup = require('netpack-rollup')
ESM default import is primary; CommonJS require also works but may lack type definitions.
RollupHost
import { RollupHost } from 'netpack-rollup'
import RollupHost from 'netpack-rollup'
Named export for the host class, not default.
createRollupHost
import { createRollupHost } from 'netpack-rollup'
const { createRollupHost } = require('netpack-rollup')
Factory function; use named import in ESM.

Shows how to create a Rollup host instance with required configuration and invoke bundling.

import { createRollupHost } from 'netpack-rollup'; const host = createRollupHost({ rollupConfig: { input: 'src/index.js', output: { dir: 'dist', format: 'esm' } }, nodeServices: { options: { /* Add NodeServices options */ } } }); host.bundle().then(() => console.log('Bundle complete')).catch(err => console.error(err));
Debug
Known issues
gotchaRequires specific version of rollup (^1.0.0) - incompatible with newer rollup versions.
fix
Pin rollup to version 1.x or use an alternative bundler host.
affects: >=1.0.0
gotchaDepends on deprecated Microsoft.AspNetCore.NodeServices package; may not work with .NET 5+.
fix
Consider migrating to JavaScriptServices alternatives or using a different approach.
affects: >=1.0.0
deprecatedPackage has not been updated in 3+ years; consider it in maintenance mode.
fix
Evaluate if the functionality is still needed and look for modern replacements.
affects: >=1.0.0
gotchaNodeServices initialization is required and must be passed in options; missing will cause runtime errors.
fix
Always provide a valid NodeServices instance in the host configuration.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup'
Rollup is not installed as a peer dependency.
fix
npm install rollup@^1.0.0 --save-dev
TypeError: Cannot read property 'bundle' of undefined
Host creation failed due to missing or invalid NodeServices.
fix
Ensure NodeServices is properly configured and passed to createRollupHost.
Error: rollupConfig is required
Missing rollupConfig in the options object.
fix
Provide a valid rollupConfig object with 'input' and 'output' properties.
Upgrade
Version history
1.0.40latest on npm
Audit
Dependencies
rolluprequiredCore bundler dependency
Microsoft.AspNetCore.NodeServicesrequiredBridge to .NET runtime
Agent activity
2 hits · last 30 days
node
2
Resources
netpack-rollup — npm install netpack-rollup · libregistry