mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[babel] configure a specific cache path
Babel needs a path to write its cache, which it automatically places to $HOME or tmp if $HOME is not defined. This causes problems when the $HOME directory is not writable or we just do not want to write to such a central location. So This moves the cache to the project directory by setting the BABEL_CACHE_PATH environment variable.
This commit is contained in:
parent
61554e0f46
commit
2e4140e94b
4 changed files with 9 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,3 +19,4 @@ webpackstats.json
|
|||
config/kibana.dev.yml
|
||||
coverage
|
||||
selenium
|
||||
.babelcache.json
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
require('babel/register')(require('../optimize/babelOptions').node);
|
||||
// load the babel options seperately so that they can modify the process.env
|
||||
// before calling babel/register
|
||||
const babelOptions = require('../optimize/babelOptions').node;
|
||||
require('babel/register')(babelOptions);
|
||||
require('./cli');
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
var fromRoot = require('requirefrom')('src/utils')('fromRoot');
|
||||
var fromRoot = require('path').resolve.bind(null, __dirname, '../../');
|
||||
process.env.BABEL_CACHE_PATH = fromRoot('optimize/.babelcache.json');
|
||||
|
||||
exports.webpack = {
|
||||
stage: 1,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
process.env.BABEL_CACHE_PATH = require('path').resolve(__dirname, '../../optimize/.babelcache.json');
|
||||
|
||||
exports.webpack = {
|
||||
stage: 1,
|
||||
nonStandard: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue