Replies: 2 comments
-
|
Since you are using TypeScript you will need to use a bundler to compile it into JavaScript.
Install it as a dev dependency and add the build script to your Then you can follow the Amplify documentation for "App build and test settings" |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
you should run and (if use esm) // build.ts
import esbuild from 'esbuild';
await esbuild.build({
logLevel: 'info',
entryPoints: ['./src/index.ts'],
outdir: './dist',
outExtension:
'.js': '.mjs'
}, // dist ext
minify: true,
bundle: true,
platform: 'node',
format: 'esm',
banner: {
js: 'import { createRequire as topLevelCreateRequire } from "module"; import url from "url"; const require = topLevelCreateRequire(import.meta.url); const __filename = url.fileURLToPath(import.meta.url); const __dirname = url.fileURLToPath(new URL(".", import.meta.url));',
},
})"scripts": {
"build": "tsx ./build.ts"
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
using Hono first time
below is my package.json
{ "scripts": { "dev": "tsx watch src/index.tsx" }, "dependencies": { "@hono/node-server": "^1.3.1", "hono": "^3.11.2" }, "devDependencies": { "tsx": "^3.12.2" } }which runs on local, now I want to deploy it in AWS amplify which check for build script and deploy
but unable to understand how and what to do for that?
someone can guide me.
NOTe: cloudfare is not free and I really dont use that so prefer AWS amplify which does the job easy.
Beta Was this translation helpful? Give feedback.
All reactions