A Rollup plugin utility to define globals using RegExp patterns, reducing boilerplate for Angular, RxJS, and other scoped packages. Versions 0.0.x, no recent releases, single maintainer. Converts simple globals object from explicit mappings to regex-based pattern matching with optional transformers like kebab-to-camelCase. Ships TypeScript definitions. Not actively maintained but stable for basic usage.
npm install rollup-globals-regexVerified import paths — ran on the pinned version, not inferred.
Shows how to configure Rollup globals using regex patterns for Angular and RxJS packages.
Migrate to manual globals mapping or use Rollup's built-in globals option with a function.
Double-check transformer behavior or define custom regex patterns without transformers.
// @ts-ignore or (globalsRegex as any)({ ... })Install @types/rollup-globals-regex manually (if available) or declare module 'rollup-globals-regex' { ... } in a .d.ts file.npm install rollup-globals-regex --save-dev
Ensure import is correct: import { GLOBAL } from 'rollup-globals-regex'. If using TS <3.8, use import GLOBAL = require('rollup-globals-regex').GLOBALUse ES module import: import { globalsRegex } from 'rollup-globals-regex' or if using CommonJS, try dynamic import: const { globalsRegex } = await import('rollup-globals-regex')Add 'type':'module' to your package.json or rename file to .mjs. Alternatively use --experimental-modules flag.
No dependency data recorded yet.