Description
We use xregexp in a shared library that is used in our client (Angular 10) as well as on our server (NodeJS / Webpack 5). Until version 4.3.0 we were able to import xregexp like this and everything worked as expected:
const XRegExp = require('xregexp');
Now we wanted to upgrade to version 4.4.0, but get the following error in the client application (Angular 10):
TypeError: XRegExp.matchRecursive is not a function
The server still works as expected.
Changing the import statement to const XRegExp = require('xregexp').default;
solves the problem in the client but leads to this error on the server: TypeError: Cannot read property 'matchRecursive' of undefined
.
We also tried import * as XRegExp from 'xregexp';
but this does not work either. Any ideas why this suddenly does not work anymore?