Skip to content

Commit

Permalink
update babel.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdmen committed Dec 15, 2023
1 parent 94dd1e8 commit 7713524
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ui.frontend/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ module.exports = (api, opts = {}) => {
// module the default value will cause the imports from the umd
// libraries (@adobe/) to be not recognized anymore
sourceType: 'unambiguous'
}
};

// Remove react-refresh/babel as this causes issues with the modules
// extracted using the mini-css-extract-plugin. sources suggest to exclude
// node_modules from babel which we cannot do because of peregrine.
// We should fix this in peregrine (make it configureable)
config.plugins = config.plugins.filter(plugin => plugin !== 'react-refresh/babel');
config.plugins = [
...config.plugins.filter(plugin => plugin !== 'react-refresh/babel'),
'"@babel/plugin-transform-optional-chaining"'
];

return config;
}
};

0 comments on commit 7713524

Please sign in to comment.