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
Hello, I have a script that is accessed by clients via GET /embed.js, I have a controller that does the redirect to the precompiled asset, so it redirects to /embed-[the-hashed-id].js This works in production but in development environment the method ActionController::Base.helpers.compute_asset_path does return an old version hash on filename after a esbuild build. My workaround right now is to restart the server, then the hash changes correclty.
This worked as expected with webpacker. the problem started when I've integrated esbuild with js-bundling
Any idea what could be the problem?
example controller:
def show
respond_to do |format|
format.js { redirect_to widget_javascript_source }
end
end
private
def widget_javascript_source
ActionController::Base.helpers.compute_asset_path("embed.js", debug: true)
end
The text was updated successfully, but these errors were encountered:
Hello, I have a script that is accessed by clients via GET
/embed.js
, I have a controller that does the redirect to the precompiled asset, so it redirects to/embed-[the-hashed-id].js
This works in production but in development environment the methodActionController::Base.helpers.compute_asset_path
does return an old version hash on filename after a esbuild build. My workaround right now is to restart the server, then the hash changes correclty.This worked as expected with webpacker. the problem started when I've integrated esbuild with js-bundling
Any idea what could be the problem?
example controller:
The text was updated successfully, but these errors were encountered: