Is there anyone out there who can assist me with this issue regarding my tsconfig.json
file?
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"esModuleInterop": true,
"skipLibCheck": true,
"noImplicitAny": false,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"@/*": ["./backend/app/*"]
},
"types": ["node"]
},
"include": ["backend/app/**/*.ts", "backend/app/**/*.vue"],
"exclude": ["node_modules"]
}
In my main.ts
file, located in backend/app/main.ts
, I am importing app.vue
from import app from './app.vue';
within the same directory. The content of app.vue
is as follows:
<template>
<router-view/>
</template>
Upon compilation, TypeScript is throwing an error:
TS2307: Cannot find module './app.vue' or its corresponding type declarations
I have also implemented ts-loader
in webpack like so:
{
test: /\.ts?$/u,
loader: 'ts-loader',
exclude: /node_modules/u,
options: {
appendTsSuffixTo: [/\.vue$/u],
},
},
The project compiles and functions properly, but the TS error persists.