samedi 29 octobre 2022

Can I use javascript packages that I installed using NPM in my Rails 6 ERB files

I created a new rails 6 project and I installed some javascript packages as well using npm. but when I am in an erb file (views/posts/index.js.erb) I cannot access jquery or any of the packages I installed using npm.

Is there a way I can use JS libraries in my *.js.erb files?

Aucun commentaire:

Enregistrer un commentaire