Skip to content

Commit

Permalink
Merge pull request #739 from dbmi-bgm/bm-babel-updates
Browse files Browse the repository at this point in the history
Bm babel updates
  • Loading branch information
Bianca-Morris authored Aug 3, 2023
2 parents 6c2ccae + c89d483 commit a1947dc
Show file tree
Hide file tree
Showing 5 changed files with 13,632 additions and 11,472 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ cgap-portal
Change Log
----------

14.1.0
======
`PR 739: Bm babel updates <https://github.com/dbmi-bgm/cgap-portal/pull/739>`_

* Add and update a bunch of babel-related dependencies to match Fourfront and SMaHT
* Update babel config to make use of new plugins


14.0.2
======
* Polyfill buffer
Expand Down
16 changes: 12 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@

module.exports = function(api){
api.cache(true);
const modulesEnabled = api.env("test");
api.cache.using(function(){ return process.env.NODE_ENV; });
return {
"presets" : [
// We don't need to convert import/export statements.
// We don't need to convert import/export statements unless in test/Jest environment (as Webpack will handle later; not converting here preserves code-splitting).
// @see https://stackoverflow.com/questions/63563485/how-can-i-preserve-dynamic-import-statements-with-babel-preset-env
[ "@babel/preset-env", { "modules": false } ],
[ "@babel/preset-env", { "modules": modulesEnabled ? "auto" : false } ],
"@babel/preset-react",
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"babel-plugin-minify-dead-code-elimination"
"babel-plugin-minify-dead-code-elimination",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/transform-async-to-generator", {
"module": "bluebird",
"method": "coroutine"
}],
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
["@babel/plugin-transform-runtime"],
],
"comments": true
};
Expand Down
Loading

0 comments on commit a1947dc

Please sign in to comment.