jsii
jsii copied to clipboard
Update tsconfig.json to the latest standards
Describe the feature
The generated tsconfig is using which is outdated in 2024.
"module": "CommonJS",
"target": "ES2020",
"lib": [
"es2020"
],
Use Case
Stay current and up to date with the TS standards.
Proposed Solution
Use the new and latest versions:
"module": "ESNext",
"target": "ESNext",
"lib": [
"ESNext"
],
Other Information
This is one of the reason why I am ejecting from projen that has tooling around JSII. My code uses the paths
inside tsconfig.json and it needs to be on the newer tsconfig values for the web-based project that uses Vite to work. This forces me to create two versions of tsconfig but then I have endless problems with paths
and eslint. So I decided to just publish my package https://github.com/rehanvdm/serverless-website-analytics in TS now and not any other languages.
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CDK version used
Environment details (OS name and version, etc.)
We can definitely talk about target and lib for the 5.4 release.
Regarding module, I'm not sure how ESM will affect the way jsii works at the moment.
Also, please support disabling the generated tsconfig.json
and don't write the .d.ts
and .js
to the src
directory. That is super annoying.
@sam-goodwin https://github.com/aws/jsii/issues/2071 I think this covers your request.
Otherwise please open a new issue for other request to config defaults.
@rehanvdm FYI we are actively looking at #2071 at the moment, which will include a mode to remove all safe-guards. Later on we might use community feedback/experience to update the defaults. Hope that makes sense.
Mostly closing this in favor of user-provided tsconfig https://github.com/aws/jsii/issues/2071
Documentation: https://aws.github.io/jsii/user-guides/lib-author/configuration/#typescript-configuration
But we still might change some defaults in future versions. New tracking issue: https://github.com/aws/jsii-compiler/issues/956
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.