[APM] Fix synthtrace cli script (#140219)

This commit is contained in:
Søren Louv-Jansen 2022-09-07 21:52:50 +02:00 committed by GitHub
parent 0e9845f13e
commit a05fab06ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,10 @@
* Side Public License, v 1.
*/
require('../src/setup_node_env');
require('@babel/register')({
extensions: ['.ts', '.js'],
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
});
// We have to import directly from package since scenarios and worker.js are imported dynamically,
// If we import the package (require('@kbn/apm-synthtrace')) the program will be executed on the compiled files, and thus we need to