Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 829 Bytes

File metadata and controls

32 lines (20 loc) · 829 Bytes

Serverless Babel Plugin

A Serverless plugin to compile your JavaScript code with Babel before deployment.

IMPORTANT: If you are interested to maintain or take ownership of this project please reach out to @nikgraf

Setup

You need to install the plugin as well as a preset. For example the babel-preset-latest:

npm install --save-dev serverless-babel-plugin babel-preset-latest

Further you need to add the plugin to your serverless.yml and defined which preset you chose:

plugins:
  - serverless-babel-plugin

custom:
  babelPresets:
    - latest

Usage

Simply run serverless deploy and it will compile every JavaScript file in your service with Babel.

More info

Find a complete example here