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

Refactor project to use SvelteKit's packaging #57

Closed
4 tasks
vatro opened this issue Feb 7, 2022 · 1 comment
Closed
4 tasks

Refactor project to use SvelteKit's packaging #57

vatro opened this issue Feb 7, 2022 · 1 comment

Comments

@vatro
Copy link
Owner

vatro commented Feb 7, 2022

@vatro vatro added this to the 1.0.0 milestone Feb 7, 2022
@vatro vatro self-assigned this Feb 7, 2022
@vatro vatro added the Svelte label Feb 7, 2022
@vatro
Copy link
Owner Author

vatro commented Feb 8, 2022

This didn't work out smoothly as I was hoping.

What I didn't like:

  • (not severe) Svelte files inside the package are heavy reformatted -> can be fixed? (I guess)
  • (not severe) Exporting types from Svelte components seems to be broken:
    exported types get removed from <script context="module">...</script> and are double-added (!?) to component.d.ts:
    could be fixed by removing all exported types from components, but it feels wrong, because it should work out of the box.
  • (bug?) empty <script context="module"> </script> blocks in *.svelte files (after removal of exported types) throw an error:
    Type '{ context: string; }' is not assignable to type 'HTMLProps<HTMLElement>'.
      Property 'context' does not exist on type 'HTMLProps<HTMLElement>'. Did you mean 'content'?js(2322)
    
    <script context="module"> </script> should be removed when empty -> report?
  • (severe) inside component.d.ts file the component class is named exactly the same as the imported 'three' class:
    could be fixed by e.g. import { AmbientLight as THREE_AmbientLight } from "three", but I would have to change a lot, and I'm quite sure there would be other negative side-effects with different builds etc.

I'm not sure if using SvelteKit's packaging is not suitable for the project, but I've decided to got with the currently working solution and get back to tweaking this setup later.

@vatro vatro closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant