rails / jsbundling-rails

Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack.
MIT License
831 stars 143 forks source link

Webpacker migration asset_pack_path in jsbundling-rails #165

Open 7Ds7 opened 1 year ago

7Ds7 commented 1 year ago

Upon migrating away from Webpacker to jsbundling-rails i am having difficulties finding one alternative way to webpacker asset_pack_path on jsbundling-rails.

The app in question relies heavily on asset_pack_path mainly for images that are shared in both frontend and rails views.  asset_pack_path would resolve the path including the file hash but i do not find any alternative in the migration guide

With webpacker both the images imported in js/css files would resolve to the proper path and hash, and within the rails views  asset_pack_path would resolve to the same path/hash.

Am i missing something? is there one direct alternative for this helper?