How to Migrate Your JavaScript From Sprockets to Webpacker
05-Nov-2020 1390
Back in 2011, Rails 3.1 introduced The Assets Pipeline feature using the Sprockets gem. This made it really easy to handle assets (images, fonts, JavaScript, CSS and more), solving many of the issues that developers had to face everyday.In 2012, Webpack was released solving the same issues in a different way and in time became the most used solution to handle assets. And since Rails 6, Webpack became the default solution to handle JavaScript assets using the Webpacker gem on new Rails applications.In this article I'll explain the steps we took to migrate to Webpack to handle our JavaScript assets, and how we added support as a node module in our styleguide.
How to Migrate Your JavaScript From Sprockets to Webpacker #ruby #rubydeveloper #rubyonrails #Migrate #JavaScript #Sprockets #Webpacker #javascript #webpacker https://rubyonrails.ba/link/how-to-migrate-your-javascript-from-sprockets-to-webpacker