Closed ghost closed 1 year ago
looks like the same issue here actually
Ah, you're right. Unfortunately the build tools do not complain about this 🤔 . Ideally, they should be automatically changed to .js
, or at least we should get a compile or lint error or so.
A PR fixing the wrong imports would be very welcome, thanks for your offer.
I get linting errors, do you know if there are more files like that?
Yes I get these linting errors too, using a different IDE though. In my case I get the suggestion to shorten the import by replacing it with "$lib"
, but that is not a good idea, since that is the index file for the library, and results in circular dependencies. (I do not yet know if I can turn off that suggestion somehow).
Alright, I made a pass and found a couple other small issues, I'm aiming to use this instead of monaco in a production application for making and receiving manual API calls, so I just want to help button everything up
Please let me know if you have any questions or issues, I look forward to using this tool in my app :)
Fixed in v0.11.2
https://github.com/josdejong/svelte-jsoneditor/blob/99df4b302d9d60479a2dcfffa669af9f9619e358/src/lib/components/modes/tablemode/ColumnHeader.svelte#L3
Hey! it looks like you are importing ts files by name, and in this example, it's causing failures on import after transpilation.
I'm not a typescript expert by any means, but I think in these examples you usually need to leave the .ts off prior to transpilation for TS files, and I think its resolves all that for you with the new .js name after transpilation.
I'm happy to submit a PR to fix this, just don't want to step on any toes