https://github.com/johnagan/serverless-parcel
A Serverless plugin to bundle your functions and assets with Parcel Bundler
https://github.com/johnagan/serverless-parcel
Last synced: about 1 year ago
JSON representation
A Serverless plugin to bundle your functions and assets with Parcel Bundler
- Host: GitHub
- URL: https://github.com/johnagan/serverless-parcel
- Owner: johnagan
- Created: 2018-11-24T22:02:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-25T20:03:42.000Z (over 7 years ago)
- Last Synced: 2025-04-28T11:16:40.602Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 77.1 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# serverless-parcel
Serverless plugin for zero-config [parcel bundler](https://parceljs.org/) support.
## Install
```
yarn add serverless-parcel --dev
```
Add the plugin to your `serverless.yml`:
```
plugins:
- serverless-parcel
```
## Configure
None required! By default, parcel will build your lambda functions with parcel... but if you want to get fancy, here ya go:
```yml
custom:
parcel:
## options for lambda functions
options:
## defaults
target: node
cache: false
watch: false
bundleNodeModules: true
outDir: autogenerated - you can't change this
## non-lambda entries you'd like to build
entries:
# an array of bundler options with an entry file
- file: src/index.html
minify: true
target: browser
- file: src/admin.html
minify: false
sourceMaps: true
```
A full list of options can be found on [parcel's api docs](https://parceljs.org/api.html)
## Shout Out
This project was heavily inspired by [serverless-plugin-typescript](https://github.com/prisma/serverless-plugin-typescript) and [serverless-webpack](https://github.com/serverless-heaven/serverless-webpack). Both are epic projects and I hope this projects grows up to be like them one day. :tada: