Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egoist/esbuild-service
esbuild as a service. bundle any npm package on the fly as you request.
https://github.com/egoist/esbuild-service
Last synced: 3 months ago
JSON representation
esbuild as a service. bundle any npm package on the fly as you request.
- Host: GitHub
- URL: https://github.com/egoist/esbuild-service
- Owner: egoist
- Created: 2020-07-18T10:08:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T14:17:30.000Z (about 3 years ago)
- Last Synced: 2024-10-23T07:53:48.360Z (4 months ago)
- Language: Go
- Homepage: https://esbuild.vercel.app
- Size: 43 KB
- Stars: 110
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - esbuild-service
- awesome-esbuild - esbuild-service
README
# esbuild-service
[esbuild](https://github.com/evanw/esbuild) as a service.
## Install
```bash
curl -sf https://gobinaries.com/egoist/esbuild-service | sh
```Then `esbuild-service` command will be available.
## How does this work
This service uses esbuild to bundle dependecies, we convert package names to [skypack.dev](https://skypack.dev) URLs to retrive the content on the fly.
## Development
```bash
# Start server
air
# the open http://localhost:8080# Build
make build
# then run `./esbuilds-service`
```## Docs
### Environment variables
- `PORT`: Server port, defaults to `8080`.
### `/*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@10/compact`Query parameters:
- `format`: Bundle format, defaults to `esm`, available values: `cjs`, `iife`
- `globalName`: Global variable name for `iife` bundle.
- `minify`: Minification, default to `true`.## License
MIT © [EGOIST](https://github.com/sponsors/egoist)