Skip to content

Commit

Permalink
Fixup shebang loader order (#196)
Browse files Browse the repository at this point in the history
* fixup shebang loader order

* fixup webpack unit test updates

* dont apply shebang loader to binaries

* fix the webpack

* update coverage unit tests
  • Loading branch information
guybedford authored and rauchg committed Dec 31, 2018
1 parent f89e9e5 commit 0b8395e
Show file tree
Hide file tree
Showing 37 changed files with 226 additions and 225 deletions.
13 changes: 7 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ module.exports = (
},
module: {
rules: [
{
parser: { amd: false },
use: [{
loader: __dirname + "/loaders/shebang-loader.js"
}]
},
{
test: /\.node$/,
use: [{
Expand All @@ -142,6 +136,13 @@ module.exports = (
}
}
}]
},
{
parser: { amd: false },
exclude: /\.node$/,
use: [{
loader: __dirname + "/loaders/shebang-loader.js"
}]
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions test/unit/amd-disable/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module.exports =
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(746);
/******/ return __webpack_require__(901);
/******/ })
/************************************************************************/
/******/ ({

/***/ 746:
/***/ 901:
/***/ (function() {

if (typeof define === 'function' && define.amd)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/amd-disable/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ module.exports =
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(644);
/******/ return __webpack_require__(947);
/******/ })
/************************************************************************/
/******/ ({

/***/ 644:
/***/ 947:
/***/ (function() {

if (typeof define === 'function' && define.amd)
Expand Down
32 changes: 16 additions & 16 deletions test/unit/asset-fs-inline-path-enc-es-2/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,26 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(182);
/******/ return __webpack_require__(954);
/******/ })
/************************************************************************/
/******/ ({

/***/ 182:
/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ }),

/***/ 954:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand All @@ -53,20 +67,6 @@ __webpack_require__.r(__webpack_exports__);

console.log(fs__WEBPACK_IMPORTED_MODULE_0___default.a.readFileSync(__dirname + '/asset.txt', 'utf8'));

/***/ }),

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ })

/******/ },
Expand Down
18 changes: 9 additions & 9 deletions test/unit/asset-fs-inline-path-enc-es-2/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,12 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(593);
/******/ return __webpack_require__(259);
/******/ })
/************************************************************************/
/******/ ({

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 593:
/***/ 259:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand All @@ -62,6 +55,13 @@ console.log(fs__WEBPACK_IMPORTED_MODULE_0___default.a.readFileSync(__dirname + '

/***/ }),

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

Expand Down
32 changes: 16 additions & 16 deletions test/unit/asset-fs-inline-path-enc-es-3/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,26 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(196);
/******/ return __webpack_require__(725);
/******/ })
/************************************************************************/
/******/ ({

/***/ 196:
/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ }),

/***/ 725:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand All @@ -53,20 +67,6 @@ __webpack_require__.r(__webpack_exports__);

console.log(fs__WEBPACK_IMPORTED_MODULE_0___default.a.readFileSync(__dirname + '/asset.txt', 'utf8'));

/***/ }),

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ })

/******/ },
Expand Down
18 changes: 9 additions & 9 deletions test/unit/asset-fs-inline-path-enc-es-3/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,12 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(655);
/******/ return __webpack_require__(545);
/******/ })
/************************************************************************/
/******/ ({

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 655:
/***/ 545:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand All @@ -62,6 +55,13 @@ console.log(fs__WEBPACK_IMPORTED_MODULE_0___default.a.readFileSync(__dirname + '

/***/ }),

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

Expand Down
4 changes: 2 additions & 2 deletions test/unit/asset-fs-inline-path-enc-es-4/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(431);
/******/ return __webpack_require__(260);
/******/ })
/************************************************************************/
/******/ ({

/***/ 431:
/***/ 260:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand Down
32 changes: 16 additions & 16 deletions test/unit/asset-fs-inline-path-enc-es-4/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,26 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(428);
/******/ return __webpack_require__(736);
/******/ })
/************************************************************************/
/******/ ({

/***/ 428:
/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ }),

/***/ 736:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand All @@ -55,20 +69,6 @@ const join = path__WEBPACK_IMPORTED_MODULE_1__["join"];

console.log(fs__WEBPACK_IMPORTED_MODULE_0___default.a.readFileSync(__dirname + '/asset.txt', 'utf8'));

/***/ }),

/***/ 589:
/***/ (function(module) {

module.exports = require("path");

/***/ }),

/***/ 66:
/***/ (function(module) {

module.exports = require("fs");

/***/ })

/******/ },
Expand Down
4 changes: 2 additions & 2 deletions test/unit/asset-fs-inline-path-enc-es/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(578);
/******/ return __webpack_require__(285);
/******/ })
/************************************************************************/
/******/ ({

/***/ 578:
/***/ 285:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand Down
4 changes: 2 additions & 2 deletions test/unit/asset-fs-inline-path-enc-es/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports =
/******/ runtime(__webpack_require__);
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(755);
/******/ return __webpack_require__(885);
/******/ })
/************************************************************************/
/******/ ({
Expand All @@ -53,7 +53,7 @@ module.exports = require("fs");

/***/ }),

/***/ 755:
/***/ 885:
/***/ (function(__unusedmodule, __webpack_exports__, __webpack_require__) {

"use strict";
Expand Down
20 changes: 10 additions & 10 deletions test/unit/asset-fs-inline-path-enc/output-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ module.exports =
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(803);
/******/ return __webpack_require__(366);
/******/ })
/************************************************************************/
/******/ ({

/***/ 366:
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {

const fs = __webpack_require__(66);
const { join } = __webpack_require__(589);
console.log(fs.readFileSync(__dirname + '/asset.txt', 'utf8'));

/***/ }),

/***/ 589:
/***/ (function(module) {

Expand All @@ -49,15 +58,6 @@ module.exports = require("path");

module.exports = require("fs");

/***/ }),

/***/ 803:
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {

const fs = __webpack_require__(66);
const { join } = __webpack_require__(589);
console.log(fs.readFileSync(__dirname + '/asset.txt', 'utf8'));

/***/ })

/******/ });
Loading

0 comments on commit 0b8395e

Please sign in to comment.