compatibility with esbuild
See original GitHub issueWhen importing stuff like Route
, Body
, etc from tsoa
, bundling code with esbuild fails and tries to use tsoa
as the cli.
Sorting
-
bug report
-
feature request
-
support request
-
I confirm that I
- used the search to make sure that a similar issue hasn’t already been submit
Steps to Reproduce
- install
esbuild
andtsoa
- copy the tsoa example from the docs
- bundle it with
esbuild src/server.ts target=node --outfile=index.js
- try running it with
node index.js
- instead of starting the server as expected, the bundled code is treated as if it were the command line tsoa function.
This can be solved by importing from @tsoa/runtime
directly.
Version of the library: "tsoa": "^3.9.0"
Version of NodeJS: v14.17.0
- Confirm you were using yarn not npm: [x]
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
Content Types - ESBuild
This is very unfortunate because it causes endless compatibility headaches, especially since JavaScript libraries are often authored in ESM and published as ...
Read more >FAQ - ESBuild
Patch versions are intended for backwards-compatible changes and minor versions are intended for backwards-incompatible changes. If you plan to use esbuild ...
Read more >Getting Started - ESBuild
Getting Started. #Install esbuild. First, download and install the esbuild command locally. A prebuilt native executable can be installed using npm (which ...
Read more >API - esbuild
Bundling with esbuild only works with statically-defined imports (i.e. when the ... This behavior improves compatibility with CommonJS modules that export a ...
Read more >Plugins - esbuild
If you want to resolve a path relative to the directory containing the importer module, you should use resolveDir instead since that also...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@WoH great! PR done, tests passed. The PR is minimal, but let me know if you have any problems with it. Thanks
Thanks!