Ruby on Rails Sunday, January 19, 2020

This is from app/javascript/application.js
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)

As you can see the path to images isn't under javascript but in the same folder as the javascript folder, app because it has this line // const images = require.context('../images', true)
I thought images in webpacker are supposed to be under javascript as in app/javascript/assets/images
I have no src directory in my app I must have deleted it somewhere along the line? Should I replace it and use it for what?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0216bb07-b308-4381-9981-a8b8573d9b4f%40googlegroups.com.

No comments:

Post a Comment