-
Notifications
You must be signed in to change notification settings - Fork 109
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
Dependancies not getting imported when leader parent has isEnabled hook that evaluates to false #340
Comments
Thanks for the thorough bug report. It would be good if we could take It seems we need to find a more robust place to hook into to ensure that the work we do in |
Yes, that seems like a hard task, maybe in the meantime, we could at least throw an error in case |
I'm having this issue as well. Is there any workaround for an app that depends on I have tried blacklisting Note: v1.6 of ember-auto-import does not have this problem, but I would like to keep up with the latest of the auto-import. |
@josemarluedke if you are working with a monorepo you can use the workaround I suggested above. |
Yeah, unfortunately, I'm not working in a monorepo, just a standalone app. |
@josemarluedke Take a look at embermap/ember-cli-fastboot-testing#434 We are probably just going to point our dependency to our own fork until something is fixed, but if you need it: there's a potential solution. |
This bug is fixed by ember-auto-import 2.0 because the parent is always the app's copy of ember-auto-import. |
Issue
After updating
ember-auto-import
to latest version we noticed that dependancies and dynamic chunks weren't getting imported in our production build.After some debugging we found that the first
ember-auto-import
addon which was getting registered as the leader by the new protocol hadember-cli-fastboot-testing
for it's parent.ember-cli-fastboot-testing
has anisEnabled
hook which evaluates to false whenapp.env !== 'development
so it'sincluded
hook was never getting called, and as a result ember-auto-import wouldn't import anything.Steps to reproduce
Repo in steps is a new ember app, the only new addons installed are
ember-cli-fastboot
andember-cli-fastboot-testing
.Installed
lodash
vianpm
and used it inside ofFoo
component. If we serve the app in development mode it will work normally, but if we build for productionlodash
won't be imported and app won't work.Workaround
As a temporary workaround for this problem because we work with a monorepo we put
ember-cli-fastboot-testing
into thebefore
array of one of our addons so that our addon would run first and get chosen as the leader.The text was updated successfully, but these errors were encountered: