mrjmd / pdb

Decoupled Blocks is a Drupal 8 module to simplify integrating javascript frameworks into your site.
https://www.drupal.org/sandbox/mrjmd/2664138
57 stars 14 forks source link

Components not loading in blocks with Drupal JS aggregation #85

Closed shrop closed 8 years ago

shrop commented 8 years ago

I was not able to get the test Angular 2 components in blocks with Drupal JS aggregation turned on. The block title shows and that is it. Turning off JS aggregation and drush cr allows the components to run properly.

I think this would probably happen on the 8.x-1.x, but haven't confirmed yet.

kenneth-bolivar-castro commented 8 years ago

@shrop it happens because when Drupal executes aggregation some dependencies don't meet, I think, it's something related with order they are loaded, but I haven't work in solve this issue then I am not for sure that's what's happening there, so what I did was disable aggregation for now.

I think, we could fix this issue by any of the following ways:

If you have another idea, feel free to share it,

shrop commented 8 years ago

Thank you! Yeah, I am leaving JS aggregation turned off for now.

Will dig more as I can this week. :)

mrjmd commented 8 years ago

This should be working now with the changes I made while upgrading to RC3, luckily without moving anything more to the header (but I did move rxjs out of the library). I've tested several example components with aggregation turned on and am not having any issues. Please reopen if that's not the case.