Skip to content

Commit

Permalink
babel-register on versions & write-translations to transpile ES6 in s…
Browse files Browse the repository at this point in the history
…erver/env.js
  • Loading branch information
endiliey committed Jul 15, 2018
1 parent a0e1f87 commit b63f585
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
* LICENSE file in the root directory of this source tree.
*/

require('babel-register')({
babelrc: false,
only: [__dirname, `${process.cwd()}/core`],
plugins: [
require('./server/translate-plugin.js'),
'transform-class-properties',
'transform-object-rest-spread',
],
presets: ['react', 'env'],
});

const program = require('commander');
const chalk = require('chalk');
const glob = require('glob');
Expand Down
1 change: 1 addition & 0 deletions lib/write-translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

require('babel-register')({
babelrc: false,
only: [__dirname, `${process.cwd()}/core`],
plugins: [
require('./server/translate-plugin.js'),
'transform-class-properties',
Expand Down

0 comments on commit b63f585

Please sign in to comment.