serverless-babel-plugin
v0.2.0
Published
A plugin to compile your code with Babel
Downloads
123
Readme
Serverless Babel Plugin
A Serverless plugin to compile your JavaScript code with Babel before deployment.
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