You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only one consumer needs to define the entry and actually include the stand-alone injector.js file. The others have to include the externals config and just hope the API is there in globals.
This can potentially be improved by defining a global store in the module. This could look like this:
// configure Injector before use
Injector.configure({
store: () => window.ss.injector; // Default = window.injectorStore (?)
});
// Use of injector with multiple stores
Injector.component.register('MyComponent', MyComponent, { store: window.vendorInjectorStore });
This would allow use as a more standard NPM module, no externals config required. Duplication of the injector code in different bundles would be acceptable.
The text was updated successfully, but these errors were encountered:
Currently this module requires consuming packages to add something like this to their webpack config:
Only one consumer needs to define the
entry
and actually include the stand-aloneinjector.js
file. The others have to include theexternals
config and just hope the API is there in globals.This can potentially be improved by defining a global store in the module. This could look like this:
This would allow use as a more standard NPM module, no externals config required. Duplication of the injector code in different bundles would be acceptable.
The text was updated successfully, but these errors were encountered: