-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
I am using:
webpacker (3.2.0)
rails (5.1.4)
JRuby 9.1.15.0
Suppose in /app/javascript/packs/hello I have:
hello_react.jsx
On Windows the manifest generated is:
{
"application.js": "/packs/application-0dc18709a85406b5e3f5.js",
"application.js.map": "/packs/application-0dc18709a85406b5e3f5.js.map",
"hello\\hello_react.js": "/packs/hello\\hello_react-5a67faa5e91dd316f476.js",
"hello\\hello_react.js.map": "/packs/hello\\hello_react-5a67faa5e91dd316f476.js.map"
}
This means in my erb file this does not work:
<%=javascript_pack_tag 'hello/hello_react' %>
I must do this:
<%=javascript_pack_tag 'hello\hello_react' %>
for a lookup to succeed.
Workaround:
class String
def os_path!
self.gsub!('/', java.io.File::separator)
self.gsub!('\\', java.io.File::separator)
end
end
in erb:
<%=javascript_pack_tag 'hello/hello_react'.os_path! %>
Metadata
Metadata
Assignees
Labels
No labels