-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Inconsistent TypeScript builds #247
Comments
Ah, I see. The call to |
The error will be fixed in the next release. However, you can work around the issue for now by passing |
This should now be fixed as of version 0.6.0. |
Hi, using version : import Koa from 'koa'
import cors from '@koa/cors'
import bodyparser from 'koa-bodyparser'
const app = new Koa()
app.use(cors())
app.use(bodyparser())
app.use(async (ctx) => {
ctx.body = 'Hello World'
})
app.listen(8080) This is the output on the terminal:
If i add |
I'm trying to build a Koa.js server. TypeScript works, but esbuild throws an error.
https://github.com/shcca/esbuild-koa
npm init
When using TypeScript directly:
npx tsc server.ts --outDir tsc-test --esModuleInterop
node tsc-test/server.js
-> localhost:3000 -> Hello WorldWhen using esbuild:
npx esbuild --bundle server.ts --outdir=esbuild-test --platform=node
I can get esbuild to work by running
npm i supports-color
. Although the 1 warning remains.It's possible I'm missing something (still learning), so apologies if that's the case. Not sure what's happening.
The text was updated successfully, but these errors were encountered: