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

Add .js extension to import statement for node16 #352

Open
dylanarmstrong opened this issue Jun 17, 2023 · 2 comments · May be fixed by #354
Open

Add .js extension to import statement for node16 #352

dylanarmstrong opened this issue Jun 17, 2023 · 2 comments · May be fixed by #354

Comments

@dylanarmstrong
Copy link

For node16 / nodenext support, this should append .js to the import statement.

So:

  tsTypes: {} as import("./index.typegen").Typegen0,

should become:

  tsTypes: {} as import("./index.typegen.js").Typegen0,

I believe this would be backwards compatible on non-node16 as well, so should be safe to change.

@Andarist
Copy link
Member

useDeclarationFileForTypegenData exists for that reason: https://github.com/statelyai/xstate-tools/releases/tag/stately-vscode%401.14.0

@dylanarmstrong
Copy link
Author

dylanarmstrong commented Jun 17, 2023

That appears to only be available in the vscode extension and not the CLI unfortunately.

Edit: Put in a PR that adds this to CLI.

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 a pull request may close this issue.

2 participants