mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
During build we transpile the server source to prevent runtime transpilation with babel/register. In order to support untranspiled plugin code, we still use babel/register with special ignore options, which used to be included in cli/index.js and now is moved to src/optimize/babelOptions.js so other code that wants to initialize a server (without the cli) can also configure babel/register.
13 lines
371 B
JavaScript
13 lines
371 B
JavaScript
module.exports = function (grunt) {
|
|
|
|
var srcFile = 'build/kibana/src/optimize/babelOptions.js';
|
|
var buildFile = 'build/kibana/src/optimize/babelOptions.build.js';
|
|
var rename = require('fs').renameSync;
|
|
var unlink = require('fs').unlinkSync;
|
|
|
|
grunt.registerTask('_build:babelOptions', function () {
|
|
unlink(srcFile);
|
|
rename(buildFile, srcFile);
|
|
});
|
|
|
|
};
|