Ask A Question

Notifications

You’re not receiving notifications from this thread.

Planning upgrade from Rails 3 to 5. How to transition assets from pipeline to webpack gracefully ? Coffee & ES6

Thomas M asked in Rails

Hello,

We plan to upgrade a production app from Rails 3 to 5.2.
We basically plan to use a mirror app since the production app is untested.
Current app is using jquery, coffee and asset pipeline

My primary concern is focused on assets management. Since we target a rails 5 app we want to use ES6, webpacker and react, and want to get rid of coffee.

How can we plan this transition ? Can we use both webpacker and old pipeline (sprocket) the time of the transition, using both javascript_tag and javascript pack_tag ?

I have the same interrogation about the css assets.

Can someone point me good resources explaining how to transition from one to another assets management please ?

Thank you in advance :)

For information purpose, I find thoses articles from EvilMartian which are great resources understanding the new webpacker way :
Part 1 https://evilmartians.com/chronicles/evil-front-part-1
Part 2 https://evilmartians.com/chronicles/evil-front-part-2
Part 3 https://evilmartians.com/chronicles/evil-front-part-3

Kind regards,
Thom

Reply

Hey Thomas,

You probably already found an answer to this, but one of my co-workers wrote a couple of articles about this topic:

Can we use both webpacker and old pipeline (sprocket) the time of the transition, using both javascript_tag and javascript pack_tag ?

Yes, I think you can use both at the same time, but I wouldn't recommend it.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.