-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Using typescript from external module results in parsing error #1075
Comments
@vigenere23 were you able to find a solution? |
@stefanovualto Yes, my template has a working fix inspired from this discussion. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as this is unrelated to language-tools, this sounds more like a limitation with how the Rollup plugin handles files. In general, you should avoid having typescript files or Svelte files which require preprocessors in your node_modules and instead provide transpiled files along with type definitions. More info: https://github.com/sveltejs/language-tools/blob/master/docs/preprocessors/typescript.md#typing-components-authoring-packages |
Describe the bug
Using typescript inside a Svelte component is fine, except when that file comes from an external module. This bug happens either when an external component using a Typescript file is imported and used or when the external Typescript file itself is directly imported and used.
Additional infos :
npm link
or by installing from npmjs.Logs
See stacktraces
To Reproduce
yarn link
yarn link svelte-component
Expected behavior
I would expect one of the following:
Stacktraces
Stack trace for locally linking dependencies
Stack trace for remotely linking dependencies
Information about your Svelte project:
3.29.0
(latest from the time of writing)Severity
It is currently blocking my project, and probably any other project that uses typescript component libraries. Starting from scratch in pain JS is possible but that's not the goal.
Additional context
More infos about the bug and temporary fixes here : sveltejs/component-template#29 (comment)
The text was updated successfully, but these errors were encountered: