Closed muco-rolle closed 1 month ago
This is indeed a known issue. Velite was originally designed for use in a bundler. I need to consider this.
I’d make a PR with some guidelines. Does it need an option to output that format in an environment without a bundler?
yes, I think it should be an options in config.output.format
Cool, I'll look into it and submit a PR
JSON import issue in a Node.js application
I tried Velite in AdonisJS and encountered an issue with importing JSON files.
The type inference seems to be broken as well.
However, if I change the import in the generated file as shown below, it fixes the issue.
Here's a reproduction repo: https://github.com/muco-rolle/velite-adonisjs