rails6 导入js依赖库css样式
Posted 学者先要会疑
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rails6 导入js依赖库css样式相关的知识,希望对你有一定的参考价值。
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样式的主要内容,如果未能解决你的问题,请参考以下文章