码迷,mamicode.com
首页 > Web开发 > 详细

rails6 导入js依赖库css样式

时间:2020-06-05 15:31:54      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:this   set   initial   win   rail   ack   style   assets   sas   

If you have upgraded your app from an earlier version of Rails make sure you add the following line:

 

 Rails.application.config.assets.paths << Rails.root.join(‘node_modules‘) in config/initializers/assets.rb.

 

This is included by default in the newly generated apps.

Then in 

app/javascripts/packs/application.sass the following should do the job:
@import ‘font-awesome/css/font-awesome‘; (no ~ and no file extension)

rails6 导入js依赖库css样式

标签:this   set   initial   win   rail   ack   style   assets   sas   

原文地址:https://www.cnblogs.com/or2-/p/13049309.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!