Skip to content

fix: add browser-safe UMD bundle for bower/script-tag users#33

Merged
nmccready merged 1 commit intomasterfrom
fix/umd-bundle-debug
Feb 16, 2026
Merged

fix: add browser-safe UMD bundle for bower/script-tag users#33
nmccready merged 1 commit intomasterfrom
fix/umd-bundle-debug

Conversation

@nmccready-tars
Copy link
Contributor

Fixes #32

Problem

v0.2.1 marked debug as an external dependency in the rollup UMD build. This works for npm/webpack users but breaks bower/script-tag users (like angular-google-maps consumers) because debug isn't available globally.

Fix

Added .bundle.js and .bundle.min.js variants that inline debug's browser build using rollup's resolve({ browser: true }). These bundles only require angular as an external dependency — no Node.js builtins, no missing modules.

Builds (all included in npm package)

File Format Debug For
angular-simple-logger.js UMD external npm/webpack users
angular-simple-logger.esm.js ESM external bundler users
angular-simple-logger.light.js UMD none users who don't need debug
angular-simple-logger.bundle.js UMD bundled bower/script-tag users
angular-simple-logger.bundle.min.js UMD bundled bower/script-tag users (min)

Testing

  • 62/62 tests passing
  • Bundle only requires angular externally
  • nemLogging module registers correctly

Workaround for #32 users right now

Pin to 0.1.7 or use the .light build which has no debug dependency.

The rollup build marked 'debug' as external, which works for npm/webpack
users but breaks bower/script-tag users who don't have debug available
globally.

Added .bundle.js and .bundle.min.js variants that inline debug's browser
build using rollup's browser resolution. These bundles only require
'angular' as an external dependency.

Existing builds unchanged:
- angular-simple-logger.js — UMD with debug external (npm users)
- angular-simple-logger.esm.js — ES module (bundler users)
- angular-simple-logger.light.js — no debug dependency
- angular-simple-logger.bundle.js — NEW: debug bundled (bower users)

Fixes #32
@nmccready nmccready merged commit fe82e32 into master Feb 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New releases 0.2.1 and 0.2.2 break angular-google-maps

2 participants