Using https://github.com/webpack/webpack/tree/master/examples/coffee-script as a test case, when I run webpack example.js output.js --devtool cheap-module-source-map, the output becomes:
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
console.log(__webpack_require__(1));
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
module.exports = {
cool: "stuff",
__webpack_require__2__webpack_require__2 answer: 42,
__webpack_require__2__webpack_require__2 external: __webpack_require__(2),
__webpack_require__2__webpack_require__2 again: __webpack_require__(2)
__webpack_require__2__webpack_require__2 };
__webpack_require__2__webpack_require__2
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
console.log("yeah coffee-script");
module.exports = 42;
/***/ }
/******/ ]);
//# sourceMappingURL=output.js.map
Using https://github.com/webpack/webpack/tree/master/examples/coffee-script as a test case, when I run
webpack example.js output.js --devtool cheap-module-source-map, the output becomes: