FormidableLabs / FormidableLabs/jest-next-dynamic

TypeError: require.resolveWeak is not a function

Open
#11 2 comments 8 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
70
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I am getting the following error when attempting to dynamically load within a babel compiled component:

```
TypeError: require.resolveWeak is not a function
```

The compiled contents looks like so:

```js
var AuthMenu = (0, _dynamic.default)(function () {
return _promise.default.resolve().then(function () {
return (0, _interopRequireWildcard2.default)(require("@connect/web-auth/lib/container/AuthMenu/AuthMenu"));
});
}, {
loadableGenerated: {
webpack: function webpack() {
return [require.resolveWeak("@connect/web-auth/lib/container/AuthMenu/AuthMenu")];
},
modules: ["@connect/web-auth/lib/container/AuthMenu/AuthMenu"]
}
});
```

I am wondering if this package supports this scenario?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.