Home>
Question

I have recently started using version 6 of rails and have questions about application.js
I asked you two questions.

(1) Location of application.js
Has the location of the application.js file changed in rails 5 and 6?
rails5➡ [project] /app/assets/javascripts/application.js
rails6➡ [project] /app/javascript/application.js

(2) How to write require in application.js file
Has the format of require changed between rails 5 and 6?

// = require rails-ujs
// = require turbolinks
// = require_tree.
require ("@ rails/ujs"). start ()
require ("turbolinks"). start ()
require ("@ rails/activestorage"). start ()
require ("channels")

Thanks.