Registry / devops / named-exports-db

named-exports-db

JSON →
library0.1.6jsnpmunverified

A database of packages that require named exports when bundled with Rollup's @rollup/plugin-commonjs. It lists packages that export CommonJS modules where named exports cannot be statically analyzed, necessitating explicit configuration. Version 0.1.6 is the latest and only stable release; the package is largely a reference list with no active development. Differentiator: serves as a community-maintained lookup for Rollup bundling issues, unlike alternatives that are runtime-based or plugin-specific.

npm install named-exports-db
INSTALL
IMPORT
SIG · NAMED-EXPORTS-DB
N
named-exports-db
devopsjavascriptv0.1.6
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

namedExportsDb
import namedExportsDb from 'named-exports-db'
const namedExportsDb = require('named-exports-db')
Package provides a default export (a Map-like object). CommonJS require works but ESM import is recommended for Rollup users.
getNamedExports
import { getNamedExports } from 'named-exports-db'
const { getNamedExports } = require('named-exports-db')
Named export available; the package exports both a default (the database) and named helpers. CommonJS destructuring works but may confuse bundlers.
db
import { db } from 'named-exports-db'
import db from 'named-exports-db'; const { db } = db;
Alternate named export for the database object. Avoid conflating with default export.

Shows how to lookup a package's named exports and integrate with Rollup's commonjs plugin.

import { getNamedExports, db } from 'named-exports-db'; // Check if a package is in the database const pkgName = 'some-commonjs-package'; if (db.has(pkgName)) { const exports = getNamedExports(pkgName); console.log(`Named exports for ${pkgName}:`, exports); } else { console.log(`${pkgName} not found. You may need to manually configure named exports in @rollup/plugin-commonjs.`); } // Example for Rollup configuration // rollup.config.js // import commonjs from '@rollup/plugin-commonjs'; // export default { // plugins: [commonjs({ namedExports: { [pkgName]: exports } })] // };
Debug
Known issues
breakingThe database may be incomplete or outdated; always verify with actual bundle analysis.
fix
Use tools like https://rollupjs.org/guide/en/#rollupplugin-commonjs to detect missing named exports.
affects: all
gotchaThe package is not a substitute for understanding CommonJS interop; entries may change between versions without notice.
fix
Pin version and test after updates.
affects: all
deprecatedNo active maintenance; the repository may be archived. Newer Rollup plugins handle some cases better.
fix
Consider using @rollup/plugin-commonjs with 'requireReturnsDefault' option or newer bundlers.
affects: all
Errors
Common errors & fixes
Could not determine named exports for module 'some-package'
The bundle contains a CommonJS module that cannot be statically analyzed.
fix
Add the package and its exports to the 'namedExports' option in @rollup/plugin-commonjs, using data from named-exports-db.
Error: Cannot find module 'named-exports-db'
Package not installed or not found in node_modules.
fix
Run 'npm install named-exports-db' or 'yarn add named-exports-db'.
Upgrade
Version history
0.1.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
named-exports-db — npm install named-exports-db · libregistry