2

I am developing an internal company app that does not reach out to the internet, therefore I can not use CDNs or Google Fonts.

In my developer console for Chrome (and not Firefox for some reason) I get errors pointing to the fact it get the following urls

https://dcn.jsdeliver.net/npm/@mdi/font@latest/materialdesignicons.min.css

and

https://fonts.googleapis.com/css?family=Roberto:100,300,400,500,700,900&display=swap

How (in nuxt/vuetify) can I turn these off?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jamie
  • 428
  • 6
  • 24
  • 1
    You could download and use those fonts locally as [explained here](https://stackoverflow.com/a/68166329/8816585). If you **really** don't have any Internet connection, dump those files directly into the project from some storage (floppy disk). – kissu Nov 12 '21 at 15:30
  • 1
    Ah thanks, that might just work – Jamie Nov 12 '21 at 15:32
  • Tell me if you have any issues with it. If it works, I'll post an answer below! – kissu Nov 12 '21 at 15:33

1 Answers1

0

First of all you need to set nuxtjs/vuetify to offline mode with this configuration:

{
  buildModules: [
    '@nuxtjs/vuetify'
  ],
  vuetify: {
    defaultAssets: false // <= this will disable autoloading Google font and MDI icons
  }
}

Then you can import these icons and fonts as here.

Eflyax
  • 5,307
  • 2
  • 19
  • 29