Open derekwisong opened 3 years ago
Vetur: Restart VLS
The following code in a fresh Vuetify project shows a red squiggly and Vetur error 2307.
<v-img :src="require('../assets/logo.svg')" class="my-3" contain height="200" />
vue create frontend
cd frontend; vue add vuetify
vetur.config.js
// vetur.config.js /** @type {import('vls').VeturConfig} */ module.exports = { // **optional** default: `{}` // override vscode settings // Notice: It only affects the settings used by Vetur. settings: { "vetur.useWorkspaceDependencies": true, "vetur.experimental.templateInterpolationService": true }, // **optional** default: `[{ root: './' }]` // support monorepos projects: ['./frontend'] }
Screenshot of error attached
You only need a svg.d.ts file in src folder.
svg.d.ts
src
declare module '*.svg';
Vetur: Restart VLS
Info
Problem
The following code in a fresh Vuetify project shows a red squiggly and Vetur error 2307.
Reproducible Case
vue create frontend
cd frontend; vue add vuetify
and select default install.vetur.config.js
to root of vscode directory containing the following and restart the VLSScreenshot of error attached