How to build Nodejs app to a single bundle .js file

Install esbuild package in development environment.

npm i esbuild -D

Build app

esbuild <entry_point.js> --bundle --platform=node --outfile=<entry_point>.bundle.js
创建时间:11/28/2024 12:51:03 PM 修改时间:11/28/2024 12:53:56 PM