Hi guys ! My time to apologize for the delay, didn't get notified for your answers.
@Rodrigo I'm already using your approach for my SvelteKit apps and it works well. But I don't have any types.
Maybe you'll have a solution for me like adding the types in my tsconfig which doesn't work for me either ? I got this in my tsconfig.json:
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true
},
"files": ["node_modules/gsap/types/index.d.ts"]
The only way for me to get the types is to import from the package directly. But this breaks my app in production. Unable to build on vercel/netlify, errors when building locally.
So either I have the types but can't use gsap as it's broken, or I get gsap without the types, and have to create a declaration.d.ts file to declare all the modules.
I can grant access to any github repo if you need to investigate this, or any other solution if needed, let me know ✌️