0

Develop with rails and Vue.js.

Vue.js use ionicons, and the fonts assets request is send only when some method called, such as below:

vue_instance.$Message.error("some message");

In dev env, it work well. But in production, I got 404 error with the font files request.

If the fonts request is write in css file, I can precomplie them and change the reference tag to asset_path and it will work in production env.

But How about this situation?

DroidNoob
  • 1,123
  • 9
  • 21
Sherllo
  • 166
  • 1
  • 10

1 Answers1

0

I found a solution, although ugly... https://stackoverflow.com/a/25761449/6946797 Just add one more css reference of those fonts. In my project, I add one more ionicons.min.css.

Community
  • 1
  • 1
Sherllo
  • 166
  • 1
  • 10