This morning, I started working on the tutorial for Meteor using Svelte and (added) TypeScript.
When I try to complete step one (hardcoded Tasks w/o Collections), I’m greeted with the following error, and I have no idea why, because it should be working as far as I know:
Uncaught ReferenceError: Task is not defined
What I don’t understand is why this is happening. My App and Task components are in line with the tutorial itself, could this be a result of improperly set up TSConfig?
Upon further experimentation, this works as intended if and only if I console.log() the imported Task component in the App component before trying to render it.
Otherwise it continues to throw the “not defined” error with Task.
So, I’ve got that enabled in my tsconfig, but it’s still exhibiting the same behavior. Second component (being imported) is not being recognized unless it’s used. Here’s my tsconfig.json:
same issue here, i have to reference every import within the script tag (eg in a console.log), otherwise it will get removed and thus is undefined later on.