Skip to content

[ts] Imports cannot be found with '.js' extension #7747

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

Closed
maxburke opened this issue Dec 30, 2022 · 1 comment
Closed

[ts] Imports cannot be found with '.js' extension #7747

maxburke opened this issue Dec 30, 2022 · 1 comment

Comments

@maxburke
Copy link
Contributor

In upgrading to flatc-22.9.29 one thing we've noticed is that change 4fca4dc adds a .js extension to imports in generated code, but it's causing build errors for us:

    Cannot find module './binary-query-element.js' from 'src/generated/query-element-union.ts'

Does the extension need to be specified? It worked previously when no extension was specified.

If the extension does need to be specified, why is it .js instead of the .ts the file-on-disk has?

@maxburke
Copy link
Contributor Author

Duplicate of #7661, closing

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

No branches or pull requests

1 participant