Short answer: You don’t need both.
Long answer: Check my other post here:
I didn’t ask if I needed both
Yup. I was complementing the answer. To make make it clearer:
“I’m not using webpacker, is that ok?”
Answer: Webpacker is deprecated and you should avoid it. Check the post I’ve linked, it explains what you should be using.
Suggestion: You don’t need both. In fact, you should only have one.
Yes, it is perfectly fine to have both
If you’re not using Webpacker, make sure that your deployment pipeline is set up to handle assets from both the Asset Pipeline and Webpacker-style assets, depending on where they’re located.