-
Notifications
You must be signed in to change notification settings - Fork 171
Open
Description
I've built a UMD bundle with Webpack 3.0.0, using devtool: '#source-map' as my source map generation option. It ends up producing a build with multiple //# sourceMappingUrl pragmas. For example:
/******/ ([
/* 0 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_0__;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
/// code
};
//# sourceMappingURL=common.js.map
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/// code
};
//# sourceMappingURL=predicates.js.map
/// etc, to end of file:
//# sourceMappingURL=build.js.map
Only the final build.js.map exists on disk. But this code finds the first sourceMappingUrl and attempts to read it, which results in errors such as:
Warning: Unable to read "C:\code\node_modules\sample\common.js.map" file (Error code: ENOENT). Use --force to continue.
I'm not familiar enough with the source map spec to know how to resolve this, but other tools (gulp, Chrome) seem to read this file fine.
Metadata
Metadata
Assignees
Labels
No labels