When reading the README for webpacker, it seems to state that javascripts that fall under app/javascript/packs is for “app-like” javascript code.
“Webpacker makes it easy to use the JavaScript pre-processor and bundler Webpack v5 to manage application-like JavaScript in Rails. It coexists with the asset pipeline, as the primary purpose for webpack is app-like JavaScript, not images, CSS, or even JavaScript Sprinkles (that all continues to live in app/assets).”
Ok, so I have some JavaScripts in app/assets/javascripts, I’m guessing this is managed by the “asset pipeline?” AKA sprockets?
When I try to include the library ‘js-cookie’ in the manifest file app/assets/javascripts/application.js via: //= require js-cookie
I end up getting an error in the browser console that says “module is not defined”