Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typesVersions pointing to source code instead of declaration files #533

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DetachHead
Copy link
Contributor

fixes #532

@hperrin
Copy link
Owner

hperrin commented Nov 22, 2022

Unfortunately, this wouldn't work, because of how the types are stripped. The ".d.ts" files just point to the svelte files, which are stripped in "dist".

@DetachHead
Copy link
Contributor Author

@hperrin perhaps we could use @sveltejs/package instead? it strips types and creates a seperate .svelte.d.ts file as well (i believe using the preprocess property in svelte.config.js), which i think would solve the problem.

@hperrin
Copy link
Owner

hperrin commented Nov 22, 2022

Yeah, I'm definitely open to implementing a better solution.

@DetachHead
Copy link
Contributor Author

@hperrin i'm in the process of converting all the packages to use svelte-package but i'm running into some strange type errors on the site package: https://github.com/DetachHead/svelte-material-ui/actions/runs/3520533501/jobs/5901535004

would you happen to have any ideas as to what's causing it?

@DetachHead
Copy link
Contributor Author

DetachHead commented Nov 23, 2022

i've successfully switched to svelte-package, you can test it out by installing the packages i published on my fork https://github.com/DetachHead/svelte-material-ui/actions/runs/3528249711/jobs/5918149377

note that i moved the sources from src to src/lib and the output from dist to package to match the default directories used by svelte-package.

i'm still not sure what causes those type errors in the site package, but all the packages i'm using in my own project seem to work

@hperrin
Copy link
Owner

hperrin commented Apr 3, 2023

I'm going to save this for SMUI v8, but I would like to implement this solution. I'm also wondering how svelte-package is making the .svelte.d.ts files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typesVersions in package.json incorrectly point to source code instead of compiled .d.ts files
2 participants