{"id":21602,"library":"named-exports-db","title":"named-exports-db","description":"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.","status":"maintenance","version":"0.1.6","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install named-exports-db","lang":"bash","label":"npm"},{"cmd":"yarn add named-exports-db","lang":"bash","label":"yarn"},{"cmd":"pnpm add named-exports-db","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package provides a default export (a Map-like object). CommonJS require works but ESM import is recommended for Rollup users.","wrong":"const namedExportsDb = require('named-exports-db')","symbol":"namedExportsDb","correct":"import namedExportsDb from 'named-exports-db'"},{"note":"Named export available; the package exports both a default (the database) and named helpers. CommonJS destructuring works but may confuse bundlers.","wrong":"const { getNamedExports } = require('named-exports-db')","symbol":"getNamedExports","correct":"import { getNamedExports } from 'named-exports-db'"},{"note":"Alternate named export for the database object. Avoid conflating with default export.","wrong":"import db from 'named-exports-db'; const { db } = db;","symbol":"db","correct":"import { db } from 'named-exports-db'"}],"quickstart":{"code":"import { getNamedExports, db } from 'named-exports-db';\n\n// Check if a package is in the database\nconst pkgName = 'some-commonjs-package';\nif (db.has(pkgName)) {\n  const exports = getNamedExports(pkgName);\n  console.log(`Named exports for ${pkgName}:`, exports);\n} else {\n  console.log(`${pkgName} not found. You may need to manually configure named exports in @rollup/plugin-commonjs.`);\n}\n\n// Example for Rollup configuration\n// rollup.config.js\n// import commonjs from '@rollup/plugin-commonjs';\n// export default {\n//   plugins: [commonjs({ namedExports: { [pkgName]: exports } })]\n// };","lang":"javascript","description":"Shows how to lookup a package's named exports and integrate with Rollup's commonjs plugin."},"warnings":[{"fix":"Use tools like https://rollupjs.org/guide/en/#rollupplugin-commonjs to detect missing named exports.","message":"The database may be incomplete or outdated; always verify with actual bundle analysis.","severity":"breaking","affected_versions":"all"},{"fix":"Pin version and test after updates.","message":"The package is not a substitute for understanding CommonJS interop; entries may change between versions without notice.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using @rollup/plugin-commonjs with 'requireReturnsDefault' option or newer bundlers.","message":"No active maintenance; the repository may be archived. Newer Rollup plugins handle some cases better.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.1.6':37 'activ':54 'altern':69 'analyz':32 'base':74 'bundl':14,66 'cannot':29 'commonj':24 'communiti':61 'community-maintain':60 'configur':35 'databas':6 'db':4 'develop':55 'differenti':56 'explicit':34 'export':3,12,23,28 'issu':67 'javascript':79 'larg':48 'latest':40 'list':20,51 'lookup':63 'maintain':62 'modul':25 'name':2,11,27 'named-exports-db':1 'necessit':33 'packag':8,21,46 'plugin':77 'plugin-specif':76 'refer':50 'releas':44 'requir':10 'rollup':16,65 'rollup/plugin-commonjs':18 'runtim':73 'runtime-bas':72 'serv':57 'specif':78 'stabl':43 'static':31 'unlik':68 'version':36","created_at":"2026-04-27T17:00:46.104847+00:00","updated_at":"2026-04-27T17:00:46.104847+00:00","problems":[{"fix":"Add the package and its exports to the 'namedExports' option in @rollup/plugin-commonjs, using data from named-exports-db.","cause":"The bundle contains a CommonJS module that cannot be statically analyzed.","error":"Could not determine named exports for module 'some-package'"},{"fix":"Run 'npm install named-exports-db' or 'yarn add named-exports-db'.","cause":"Package not installed or not found in node_modules.","error":"Error: Cannot find module 'named-exports-db'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/named-exports-db","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}