-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Generator not compatible with "type": "module". #80
Comments
This might be a duplicate of #71, but I wanted to create my own issue. |
Hi @mrnossiom, |
ivanhofer
added a commit
that referenced
this issue
Sep 15, 2021
* fix: add flag for esm support Fix: #80 * docs: add documentation for esm support flag * fix: remove space in import and modify README at types part * test: add tests for esmImports flag * refactor: change the flag esmSupport to esmImports * checkout PR * update changelog * refactor(generator): add a relativeFileImportPath function * test: add the tests for esmImports flag * improve esmImports docs Co-authored-by: Ivan Hofer <ivan.hofer@outlook.com>
Fixed in version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Ivan,
I switched to full ESM modules and everything works except the generated file
i18n-util.ts
.The import statement isn't compatible with ESM, since it imports without the
.js
extension and tries to import a folder directly.Maybe there is a way to add support via a flag. (like
esmSupport
)Something like this at https://github.com/ivanhofer/typesafe-i18n/blob/main/packages/generator/src/files/generate-util.ts#L114
I can make a pull request if you accept with all necessary types and code changes.
I'm at your disposal for any questions
MrNossiom
Thanks
The text was updated successfully, but these errors were encountered: