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
Hi, we're using this in a Rails application that is deployed on Heroku using their Pipeline feature. After upgrading to the latest beta, I noticed that the manifest file that is generated includes the asset host configured for the application.
The issue we're having with this is that the asset host is different between application stages (staging uses one CDN, production uses another). So if I take a build of the application meant for staging, and try to directly promote it to master, it will be using the wrong CDN. Before upgrading, we were able to promote without having this issue.
My understanding of why this is needed is so that if you're doing some kind of code splitting where JS files are lazy loaded, the compiled JS files need to know where to grab the other split files from. Our JS files are split now after performing this upgrade to Webpacker 6, but they appear to all be eager loaded in the HTML by the javascript_pack_tag helper.
I realize that depending on your setup, to some this is a feature and not a bug. But because we are not lazy loading JS files from JS, this ends up causing more problems than it fixes. Is there a way to disable this functionality if we don't need it?
Thank you!
The text was updated successfully, but these errors were encountered:
I think I've achieved the desired effect by setting the WEBPACKER_ASSET_HOST ENV variable to an empty string.
I tried that before I posted but it didn't work. I realized later that the JS hadn't rebuilt because no JS changes had happened, so it didn't rebuild the manifest file with the new ENV variable present. Once I forced the JS to rebuilt, the manifest was built without the CDN host.
Hi, we're using this in a Rails application that is deployed on Heroku using their Pipeline feature. After upgrading to the latest beta, I noticed that the manifest file that is generated includes the asset host configured for the application.
The issue we're having with this is that the asset host is different between application stages (staging uses one CDN, production uses another). So if I take a build of the application meant for staging, and try to directly promote it to master, it will be using the wrong CDN. Before upgrading, we were able to promote without having this issue.
My understanding of why this is needed is so that if you're doing some kind of code splitting where JS files are lazy loaded, the compiled JS files need to know where to grab the other split files from. Our JS files are split now after performing this upgrade to Webpacker 6, but they appear to all be eager loaded in the HTML by the
javascript_pack_tag
helper.I realize that depending on your setup, to some this is a feature and not a bug. But because we are not lazy loading JS files from JS, this ends up causing more problems than it fixes. Is there a way to disable this functionality if we don't need it?
Thank you!
The text was updated successfully, but these errors were encountered: