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
-
using Hono first time
below is my package.json
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