Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要获取绝对 url 一个 javascript 包,我无法找到在源代码中执行此操作的方法。
通过使用它对我有用:
<%= asset_pack_path('scripts.js') %>
有关更多信息,请查看此链接
这似乎对我有用
<%= url_to_asset(Webpacker::Manifest.lookup("app.js")) %>