I'm encountering a specific issue with my svelte project
main.ts
import App from './App.svelte';
const app = new App({
target: document.body,
});
export default app;
The first line is triggering a warning message
Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module './App.svelte' or its corresponding type declarations.
Despite having what seems to be the correct configuration and adding
"@tsconfig/svelte": "^2.0.1",
in my tsconfig file, I still encounter this issue
rollup.config.js
import svelte from 'rollup-plugin-svelte';
// Other rollup plugins listed here
// Configuration settings and plugins specified within the file
tsconfig.json
{
// tsconfig settings listed here
}
While I am able to import .svelte
files within other .svelte
files, the problem arises when trying to import .svelte
files into .ts
files