I am very confused in asset management in rails 7. Now I have worked with rails 5 and I totally know the the asset pipeline concept in 5 version of rails. But recently I started working on rails 7 ( 7.1.3.2) project and it has importmaps . Now in my old sprockets approach, I have my css in app/assets/stylesheets and my js in app/assets/javascripts and I include these links in my layout file using stylesheet_link_tag or javascript_include_tag. But in my new rails 7 project, stylesheet_link_tag is there but javascript_include tag is replaced with importmap_tags. I got a design from the designer to implement in my app. My questions are following 1- I have putted all my css in app/assets/stylesheets and using stylesheet_link_tag. Moreover I am using background-image property in my styles.css so I have installed sass-rails gem and converted my .css to .scss to get the image_url helper method in css file. Is this the right approach. 2- My js part includes cdns to bootstrap and jquery. Other than these cdn's , I have my script.js file which includes all my javascript code other than the third part libraries like jquery and bootstrap. Where should I put this script.js file??? in app/assets/javascripts by creating javascripts folder there or in app/javascript and import them into my application.js file which is using importmaps. 3- Where should I put these jquery cdn. 4- What will be precompilation process in rails 7 .
Please guide accordingly.