Skip to content

Conversation

sponomarev
Copy link

As pointed out in #2219 (comment), there was no way to put dynamic/lazy chunks behind the CDN without precompiling WEBPACKER_ASSET_HOST. This approach works if you're able to determine CDN host during the assets compilation stage, but in some cases, it's not possible. For instance, when we run a dockerized application where a single Docker image is intended to be reused in multiple environments and installations.

The proposed changes allow overriding __webpack_public_path__ in runtime and take into account Rails app config.action_controller.asset_host setting. Besides, this is a convenient Webpack way to set Webpack's publicPath on the fly.

Sorry, I can't find your release policy. Should I backport this feature to Webpacker 4.x as well?

@sponomarev sponomarev marked this pull request as draft June 22, 2020 14:01
@sponomarev sponomarev closed this Jun 22, 2020
@sponomarev sponomarev deleted the feature/webpack_assets_path_tag branch December 15, 2020 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant