Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

UMD Bundle import compatibility with systemjs #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wiredprogrammer
Copy link

These changes seem to work for me on the project I'm working on using systemjs and the UMD Bundle.
Currently I get errors when trying to use this library due to the way it's internal imports are structured. I assume these changes are in line with the proper usage of UMD with systemjs but I'm far from a expert.
#14

Updated import entry for ngrx/core for UMD compatibility.
Updated import entry for ngrx/core for UMD compatibility.
Updated import entry for ngrx/core for UMD compatibility.
@ajbarber
Copy link

I experienced the same symptoms, but didn't need to make the change suggested in the commit above. Just add the following lines to the map section of your systemjs.config.js (along with all the umd bundles)

  '@ngrx/core/compose': 'npm:@ngrx/core/compose.js',
  '@ngrx/core/operator/select': 'npm:@ngrx/core/operator/select.js',

So a working systemjs.config map for me looks like:

  '@ngrx': 'npm:@ngrx',
  '@ngrx/core': 'npm:@ngrx/core/bundles/core.umd.js',
  '@ngrx/core/compose': 'npm:@ngrx/core/compose.js',
  '@ngrx/core/operator/select': 'npm:@ngrx/core/operator/select.js',
  '@ngrx/effects': 'npm:@ngrx/effects/bundles/effects.umd.js',
  '@ngrx/store': 'npm:@ngrx/store/bundles/store.umd.js',
  '@ngrx/store-devtools': 'npm:@ngrx/store-devtools/bundles/store-devtools.umd.js',
  '@ngrx/store-log-monitor': 'npm:@ngrx/store-log-monitor/bundles/store-log-monitor.umd.js'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants