add support for the various es6 presets
This commit is contained in:
parent
e94ae7555b
commit
c5c685275b
6
index.js
6
index.js
|
@ -1,4 +1,8 @@
|
|||
var babel = require("babel-core");
|
||||
require("babel-preset-react");
|
||||
require("babel-preset-es2015");
|
||||
require("babel-preset-es2016");
|
||||
require("babel-preset-es2017");
|
||||
|
||||
module.exports = function(embark) {
|
||||
|
||||
|
@ -10,7 +14,7 @@ module.exports = function(embark) {
|
|||
return source;
|
||||
}
|
||||
|
||||
return babel.transform(source, {}).code;
|
||||
return babel.transform(source, {minified: true, presets: ['es2015', 'es2016', 'es2017', 'react']}).code;
|
||||
});
|
||||
|
||||
};
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"babel-core": "^6.18.2"
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-core": "^6.18.2",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-preset-es2016": "^6.16.0",
|
||||
"babel-preset-es2017": "^6.16.0",
|
||||
"babel-preset-react": "^6.16.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue