Unable to set defaultAssets to false to stop automatic loading of materialdesignicons.min.css and Robotto font.
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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.
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.
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,
}],
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.