weixin_39616477
weixin_39616477
2020-12-27 11:08

Use npm typeface-roboto

I was wondering if it would be possible to remove the url('//fonts.googleapis.com/css?family=Roboto:400,500,700'); statement and use typeface-roboto (or include the font as part of the build process).

The reason I ask is that while I develop my app while connected to the Internet, I deploy my app to a private corporate network without Internet access. The app fails to load properly because it can't connect to Google Fonts and I end up having to go in and manually remove the import statement.

If there's another way to get around this, I'd be happy to find out about it. Thanks!

该提问来源于开源项目:chronotruck/vue-ctk-date-time-picker

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39616477 weixin_39616477 3月前

    Some other options, if you prefer including Roboto in your distribution vs making it a dependency:

    • https://www.npmjs.com/package/google-fonts-plugin
    • https://www.npmjs.com/package/google-fonts-webpack-plugin
    点赞 评论 复制链接分享
  • weixin_39859819 weixin_39859819 3月前

    Hi !

    I will analyze this option and I will come back to you to tell you if I add this or not.

    Thank you!

    点赞 评论 复制链接分享
  • weixin_39616477 weixin_39616477 3月前

    I appreciate you looking into it, thanks!

    点赞 评论 复制链接分享
  • weixin_39859819 weixin_39859819 3月前

    101

    I removed the font import I will released this in '2.0.0-rc7` (beta version)

    点赞 评论 复制链接分享
  • weixin_39859819 weixin_39859819 3月前

    I released : https://github.com/chronotruck/vue-ctk-date-time-picker/releases/tag/2.0.0-rc7

    点赞 评论 复制链接分享
  • weixin_39616477 weixin_39616477 3月前

    Cool, thanks!

    点赞 评论 复制链接分享