Rails 6 without Webpacker
In the below the rails 6 application application.js file :
In the rails 6 application with webpacker.
How to create an application in rails 6 without using WebPacker.
You can easily create a new application in the rails 6 without using the webpacker by following a few easy commands.
rails new app-name –skip-webpack-install
–skip-webpack-install prevents the generator from running rails webpacker:install.
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
Now you can easily create development in Rails 6 applications without using webpacker. It will be easy for you if you use a small application in the latest rails version.
Why do people want to use Rails 6 without a WebPacker?
The webpacker is dependent on the Yarn and Node. There should be a compatible version of the yarn and node for the webpacker. It is very complicated to go with a webpacker.