esbuild-service
esbuild as a service.
Install
curl -sf https://gobinaries.com/egoist/esbuild-service | sh
Then esbuild-service
command will be available.
The first time you send a request will be slow because it needs to install a few npm package to shim Node.js built-in modules.
Development
# Start server
make run
# the open http://localhost:8080
# Build
make build
# then run `./esbuilds-service`
Docs
Environment variables
PORT
: Server port, defaults to8080
.
/build/*pkg
Build an npm package, pkg
can be:
- A bare name like
vue
- Name with version:
[email protected]
- Name, version and a file path:
preact/[email protected]
Query parameters:
format
: Bundle format, defaults toesm
, available values:cjs
,iife
globalName
: Global variable name foriife
bundle.
TODO
Support version range, e.g. [email protected]^2
should automatically use the latest version that satifies the version range.
License
MIT © EGOIST