ngrx / store-log-monitor

Log Monitor for @ngrx/store-devtools and Angular
MIT License
63 stars 18 forks source link

UMD Bundle import compatibility with systemjs #17

Open wiredprogrammer opened 7 years ago

wiredprogrammer commented 7 years ago

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. https://github.com/ngrx/store-log-monitor/issues/14

ajbarber commented 7 years ago

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'