Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // factory-registry.js
- export default FactoryRegistry {
- static register(name, klass) {
- this._factories = this._factories || {};
- this._factories[name] = klass;
- }
- }
- // factory instance
- import Factory from './factory-registry.js';
- export default FactoryInstance {
- build(){
- // DOIT
- }
- }
- // The problem, in dev this gets invoked, but in production
- // it doesn't, is this an ember-cli build optimization to lazily evaluate
- // classes?
- FactoryRegistry.register('factoryInstance', FactoryInstance)
Add Comment
Please, Sign In to add comment