Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compat adapter to add re-export observer-manager service #1543

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/compat/src/compat-adapters/ember-scroll-modifiers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import V1Addon from '../v1-addon';

export default class extends V1Addon {
get packageMeta() {
let meta = super.packageMeta;
// observer-manager is injected with the undocumented package@service syntax without being app re-exported
// this makes sure that the service is always re-exported and injectable even when built with staticAddonTrees=true
if (
meta['implicit-modules'] &&
!meta['implicit-modules'].find(implicitModule => implicitModule === './services/observer-manager.js')
) {
meta['implicit-modules'].push('./services/observer-manager.js');
} else if (!meta['implicit-modules']) {
meta['implicit-modules'] = ['./services/observer-manager.js'];
}
return meta;
}
}