-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: SuZhou-Joe <[email protected]>
- Loading branch information
1 parent
01c7547
commit b946d8e
Showing
3 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
// babelrc doesn't respect NODE_PATH anymore but using require does. | ||
// Alternative to install them locally in node_modules | ||
module.exports = function (api) { | ||
// ensure env is test so that this config won't impact build or dev server | ||
if (api.env('test')) { | ||
return { | ||
presets: [ | ||
require('@babel/preset-env'), | ||
require('@babel/preset-react'), | ||
require('@babel/preset-typescript'), | ||
], | ||
plugins: [ | ||
[require('@babel/plugin-transform-runtime'), { regenerator: true }], | ||
require('@babel/plugin-proposal-class-properties'), | ||
require('@babel/plugin-proposal-object-rest-spread'), | ||
[require('@babel/plugin-transform-modules-commonjs'), { allowTopLevelThis: true }], | ||
], | ||
}; | ||
} | ||
return {}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters