FormidableLabs / FormidableLabs/inspectpack
BUG: `multi DOCUMENT_PATH` not inferred correctly.
- Dominant language
- TypeScript
- Stars
- 590
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
If we produce up with a bundle like:
```js
/***/ 61:
/*!*******************************************************************************!*\
!*** multi /PATH/TO/my-app/node_modules/next/dist/pages/_document.js ***!
\*******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! /PATH/TO/my-app/node_modules/next/dist/pages/_document.js */62);
/***/ }),
/***/ 62:
/*!*************************************************************************!*\
!*** /PATH/TO/my-app/node_modules/next/dist/pages/_document.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! next/document */ 63)
```
We get the plugin report of:
```
## static/HASH/pages/_document.js
next (Found 1 resolved, 1 installed. Latest version 7.0.0.)
7.0.0
~/next
* Dependency graph
my-app@0.0.1 -> next@^7.0.0
* Duplicated files in static/HASH/pages/_document.js
next/dist/pages/_document.js (S, 42)
```
**The issue**: This is because the different sources:
- `multi /PATH/TO/my-app/node_modules/next/dist/pages/_document.js`
- `/PATH/TO/my-app/node_modules/next/dist/pages/_document.js`
both resolve to a short name of `next/dist/pages/_document.js`
## Task
- [ ] Dig into what `multi NAME` really means.
- [ ] See if there are _other_ things like `multi` that may occur?
- [ ] Deal with the naming issue. (Maybe preserve multi?)
- [ ] Add regression tests.
Contributor guide
Assessment
This issue has not been assessed yet.