vuetify-module icon indicating copy to clipboard operation
vuetify-module copied to clipboard

Unable to set defaultAssets to false to stop automatic loading of materialdesignicons.min.css and Robotto font.

Open andyfensham opened this issue 5 years ago • 4 comments

Module version "1.11.2"

Describe the bug I am unable to set the config file to exclude materialdesignicons being loaded automatically. I installed @mdi/js and am importing my icons like this import { mdiHome } from '@mdi/js'

According to your documentation, I can switch the automatic loading of materialdesignicons and font off by setting defaultAssets to false. This however does not work.

I have also tried the following : defaultAssets: { font: false, icons:false }

To Reproduce Here is my full Vuetifyjs config

vuetify: { customVariables: ['~/assets/variables.scss'], theme: { dark: false, themes: { dark: { primary: '#757575', secondary: '#424242', accent: '#82B1FF', error: '#FF5252', info: '#2196F3', success: '#4CAF50', warning: '#FFC107', }, light: { primary: '#757575', secondary: '#424242', accent: '#82B1FF', error: '#FF5252', info: '#2196F3', success: '#4CAF50', warning: '#FFC107', }, }, treeShake: true, defaultAssets: false, }, },

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior When I check the network traffic, materialdesignicons.min.css and roboto font should not be loaded.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

andyfensham avatar Aug 31 '20 15:08 andyfensham

Your documentation states that : You can also set the whole defaultAssets option to false to prevent any automatic add of these two assets. You can read more about adding your own assets in the Offline applications section.

andyfensham avatar Aug 31 '20 15:08 andyfensham

This worked for me, I think there might be a difference if you pass the options inside the import or outside.

['@nuxtjs/vuetify', {
      optionsPath: '~/assets/scss/vuetify-options.js',
      customVariables: ['~/assets/scss/vuetify-theme.scss'],  
      defaultAssets: {
        font: false,
        icons: false,
      },
      lang: {current: 'de'},
      treeShake: true,
    }],

sugoidesune avatar Sep 14 '20 09:09 sugoidesune

I ran into the same issue, but different steps to reproduce. For me the bug occurs when treeShake is false, setting it to true meant I could set a different font correctly.

andrewharvey avatar Sep 19 '20 03:09 andrewharvey