mirror of https://github.com/status-im/metro.git
Use absolute locations for plugins and presets in packager babel config
Reviewed By: davidaurelio Differential Revision: D5044244 fbshipit-source-id: ab1af28d0158c22d0426a7a3b3f1bb0a63abac4e
This commit is contained in:
parent
eeac719b69
commit
b855e874cc
|
@ -19,13 +19,13 @@ function registerOnly(onlyList) {
|
||||||
function config(onlyList) {
|
function config(onlyList) {
|
||||||
_only = _only.concat(onlyList);
|
_only = _only.concat(onlyList);
|
||||||
return {
|
return {
|
||||||
presets: ['es2015-node'],
|
presets: [require('babel-preset-es2015-node')],
|
||||||
plugins: [
|
plugins: [
|
||||||
'transform-flow-strip-types',
|
'transform-flow-strip-types',
|
||||||
'syntax-trailing-function-commas',
|
'syntax-trailing-function-commas',
|
||||||
'transform-object-rest-spread',
|
'transform-object-rest-spread',
|
||||||
'transform-async-to-generator',
|
'transform-async-to-generator',
|
||||||
],
|
].map(pluginName => require(`babel-plugin-${pluginName}`)),
|
||||||
only: _only,
|
only: _only,
|
||||||
retainLines: true,
|
retainLines: true,
|
||||||
sourceMaps: 'inline',
|
sourceMaps: 'inline',
|
||||||
|
|
Loading…
Reference in New Issue