mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Add option to compile with babel
This commit is contained in:
parent
01e3e1edf3
commit
0a33c1826f
@ -14,6 +14,7 @@ var JawsError = require('../jaws-error'),
|
||||
AWS = require('aws-sdk'),
|
||||
AWSUtils = require('../utils/aws'),
|
||||
utils = require('../utils/index'),
|
||||
babelify = require('babelify'),
|
||||
browserify = require('browserify'),
|
||||
UglifyJS = require('uglify-js'),
|
||||
wrench = require('wrench'),
|
||||
@ -622,6 +623,10 @@ Packager.prototype._browserifyBundle = Promise.method(function() {
|
||||
},
|
||||
});
|
||||
|
||||
if (_this._awsmJson.lambda.package.optimize.babel) {
|
||||
b.transform(babelify)
|
||||
}
|
||||
|
||||
// optimize.exclude
|
||||
_this._awsmJson.lambda.package.optimize.exclude.forEach(function(file) {
|
||||
b.exclude(file);
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
"dependencies": {
|
||||
"async": "^0.9.0",
|
||||
"aws-sdk": "^2.1.24",
|
||||
"babelify": "^6.3.0",
|
||||
"bluebird": "^2.9.34",
|
||||
"browserify": "^11.0.1",
|
||||
"chalk": "^1.1.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user