FormidableLabs / FormidableLabs/inspectpack

Test Fixture Bug: `multiple-chunks` webpack1 scenario is broken.

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
bug test fixture
Dominant language
TypeScript
Stars
590
Forks
20
PR merge metrics
No merged PRs in 30d

Description

_This appears to be a webpack1 issue (not the fault of this library)._

In`test/fixtures/multiple-chunks/src/index-multiple-webpack1.js` running the compiled bundle in the browser results in this error:

```
bundle-multiple.js:50 Uncaught TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (bundle-multiple.js:50)
at __webpack_require__.e (bundle-multiple.js:107)
at webpackJsonpCallback (bundle-multiple.js:21)
at 2.2.js:1
```

because the code looks like:

```js
// Async code splitting.
__webpack_require__.e/* nsure */(2, (require) => {
const { foo } = require("foo"/* SHOULD BE: 1*/);
console.log("foo", foo());
});

__webpack_require__.e/* nsure */(3, (require) => {
const { differentFoo } = require("different-foo"/* SHOULD BE: 2*/);
console.log("differentFoo", differentFoo());
});

__webpack_require__.e/* nsure */(4, (require) => {
const { bar } = require("bar"/* SHOULD BE: 5*/);
console.log("bar", bar());
});
```

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.