From 7d7cafb21f36ee9e9f5bbf5e3bcfdce05eb60e9c Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Sun, 21 Mar 2021 13:40:21 +0200 Subject: [PATCH 1/2] ts interop test and fix --- src/index.js | 2 ++ test/cli.js | 4 ++++ test/fixtures/ts-interop/interop.ts | 4 ++++ test/fixtures/ts-interop/tsconfig.json | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 test/fixtures/ts-interop/interop.ts create mode 100644 test/fixtures/ts-interop/tsconfig.json diff --git a/src/index.js b/src/index.js index 73e8b0d3..404bb1c6 100644 --- a/src/index.js +++ b/src/index.js @@ -299,6 +299,8 @@ function ncc ( transpileOnly, compiler: eval('__dirname + "/typescript.js"'), compilerOptions: { + allowSyntheticDefaultImports: true, + module: 'esnext', outDir: '//', noEmit: false } diff --git a/test/cli.js b/test/cli.js index f5f64b03..f85efe1b 100644 --- a/test/cli.js +++ b/test/cli.js @@ -1,4 +1,8 @@ [ + { + args: ["run", "test/fixtures/ts-interop/interop.ts"], + expect: { code: 0 } + }, { args: ["run", "test/fixtures/interop-test.mjs"], expect: { code: 0 } diff --git a/test/fixtures/ts-interop/interop.ts b/test/fixtures/ts-interop/interop.ts new file mode 100644 index 00000000..21b2978e --- /dev/null +++ b/test/fixtures/ts-interop/interop.ts @@ -0,0 +1,4 @@ +import path from 'path'; +import * as path2 from 'path'; +path.resolve('dir'); +path2.resolve('dir'); diff --git a/test/fixtures/ts-interop/tsconfig.json b/test/fixtures/ts-interop/tsconfig.json new file mode 100644 index 00000000..311847da --- /dev/null +++ b/test/fixtures/ts-interop/tsconfig.json @@ -0,0 +1,2 @@ +{} + From 5503dfae5bfb003a310bd15fb39938bf41c11755 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Sun, 21 Mar 2021 14:17:25 +0200 Subject: [PATCH 2/2] update unit tests --- test/unit/bundle-subasset2/output-coverage.js | 160 ++++++++++-------- test/unit/bundle-subasset2/output.js | 160 ++++++++++-------- test/unit/ts-decl-dir/output-coverage.js | 68 ++------ test/unit/ts-decl-dir/output.js | 68 ++------ test/unit/ts-decl/output-coverage.js | 68 ++------ test/unit/ts-decl/output.js | 68 ++------ test/unit/ts-exts/output-coverage.js | 82 +++------ test/unit/ts-exts/output.js | 82 +++------ .../tsconfig-paths-allowjs/output-coverage.js | 78 +-------- test/unit/tsconfig-paths-allowjs/output.js | 48 +++++- .../output-coverage.js | 68 +++----- .../output.js | 48 +++++- test/unit/tsconfig-paths/output-coverage.js | 68 +++----- test/unit/tsconfig-paths/output.js | 48 +++++- 14 files changed, 457 insertions(+), 657 deletions(-) diff --git a/test/unit/bundle-subasset2/output-coverage.js b/test/unit/bundle-subasset2/output-coverage.js index 1d169889..1b549a7b 100644 --- a/test/unit/bundle-subasset2/output-coverage.js +++ b/test/unit/bundle-subasset2/output-coverage.js @@ -1,12 +1,90 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 448: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nccwpck_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __nccwpck_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +var __webpack_exports__ = {}; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { +;// CONCATENATED MODULE: external "piscina" +const external_piscina_namespaceObject = require("piscina"); +var external_piscina_default = /*#__PURE__*/__nccwpck_require__.n(external_piscina_namespaceObject); +;// CONCATENATED MODULE: external "path" +const external_path_namespaceObject = require("path"); +;// CONCATENATED MODULE: ./test/unit/bundle-subasset2/input.ts +var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } @@ -14,7 +92,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __generator = (this && this.__generator) || function (thisArg, body) { +var __generator = (undefined && undefined.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } @@ -41,10 +119,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -exports.__esModule = true; -var piscina_1 = __nccwpck_require__(409); -var path = __nccwpck_require__(622); -var piscina = new piscina_1["default"]({ + + +var piscina = new (external_piscina_default())({ filename: __nccwpck_require__.ab + "pi-bridge.js" }); (function () { @@ -62,65 +139,6 @@ var piscina = new piscina_1["default"]({ }); })(); - -/***/ }), - -/***/ 622: -/***/ ((module) => { - -module.exports = require("path"); - -/***/ }), - -/***/ 409: -/***/ ((module) => { - -module.exports = require("piscina"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(448); -/******/ module.exports = __webpack_exports__; -/******/ +module.exports = __webpack_exports__; /******/ })() ; \ No newline at end of file diff --git a/test/unit/bundle-subasset2/output.js b/test/unit/bundle-subasset2/output.js index f0f7cd2a..1b549a7b 100644 --- a/test/unit/bundle-subasset2/output.js +++ b/test/unit/bundle-subasset2/output.js @@ -1,12 +1,90 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 886: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nccwpck_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __nccwpck_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat */ +/******/ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ +var __webpack_exports__ = {}; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { +;// CONCATENATED MODULE: external "piscina" +const external_piscina_namespaceObject = require("piscina"); +var external_piscina_default = /*#__PURE__*/__nccwpck_require__.n(external_piscina_namespaceObject); +;// CONCATENATED MODULE: external "path" +const external_path_namespaceObject = require("path"); +;// CONCATENATED MODULE: ./test/unit/bundle-subasset2/input.ts +var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } @@ -14,7 +92,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __generator = (this && this.__generator) || function (thisArg, body) { +var __generator = (undefined && undefined.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } @@ -41,10 +119,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -exports.__esModule = true; -var piscina_1 = __nccwpck_require__(409); -var path = __nccwpck_require__(622); -var piscina = new piscina_1["default"]({ + + +var piscina = new (external_piscina_default())({ filename: __nccwpck_require__.ab + "pi-bridge.js" }); (function () { @@ -62,65 +139,6 @@ var piscina = new piscina_1["default"]({ }); })(); - -/***/ }), - -/***/ 622: -/***/ ((module) => { - -module.exports = require("path"); - -/***/ }), - -/***/ 409: -/***/ ((module) => { - -module.exports = require("piscina"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module is referenced by other modules so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(886); -/******/ module.exports = __webpack_exports__; -/******/ +module.exports = __webpack_exports__; /******/ })() ; \ No newline at end of file diff --git a/test/unit/ts-decl-dir/output-coverage.js b/test/unit/ts-decl-dir/output-coverage.js index a9de81e4..610885cd 100644 --- a/test/unit/ts-decl-dir/output-coverage.js +++ b/test/unit/ts-decl-dir/output-coverage.js @@ -1,51 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 867: -/***/ ((__unused_webpack_module, exports) => { - - -exports.X = true; -function test(arg) { - return arg; -} -exports.B = test; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ @@ -80,17 +36,21 @@ exports.B = test; /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { +// ESM COMPAT FLAG __nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "__esModule": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.X), -/* harmony export */ "test": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.B) -/* harmony export */ }); -/* harmony import */ var _test_ts__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(867); +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "test": () => (/* reexport */ test) +}); + +;// CONCATENATED MODULE: ./test/unit/ts-decl-dir/test.ts +function test(arg) { + return arg; +} + +;// CONCATENATED MODULE: ./test/unit/ts-decl-dir/input.js -})(); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/ts-decl-dir/output.js b/test/unit/ts-decl-dir/output.js index 25a56977..610885cd 100644 --- a/test/unit/ts-decl-dir/output.js +++ b/test/unit/ts-decl-dir/output.js @@ -1,51 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 57: -/***/ ((__unused_webpack_module, exports) => { - - -exports.X = true; -function test(arg) { - return arg; -} -exports.B = test; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ @@ -80,17 +36,21 @@ exports.B = test; /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { +// ESM COMPAT FLAG __nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "__esModule": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.X), -/* harmony export */ "test": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.B) -/* harmony export */ }); -/* harmony import */ var _test_ts__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(57); +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "test": () => (/* reexport */ test) +}); + +;// CONCATENATED MODULE: ./test/unit/ts-decl-dir/test.ts +function test(arg) { + return arg; +} + +;// CONCATENATED MODULE: ./test/unit/ts-decl-dir/input.js -})(); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/ts-decl/output-coverage.js b/test/unit/ts-decl/output-coverage.js index cb8db85c..e2edaed3 100644 --- a/test/unit/ts-decl/output-coverage.js +++ b/test/unit/ts-decl/output-coverage.js @@ -1,51 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 563: -/***/ ((__unused_webpack_module, exports) => { - - -exports.X = true; -function test(arg) { - return arg; -} -exports.B = test; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ @@ -80,17 +36,21 @@ exports.B = test; /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { +// ESM COMPAT FLAG __nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "__esModule": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.X), -/* harmony export */ "test": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.B) -/* harmony export */ }); -/* harmony import */ var _test_ts__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(563); +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "test": () => (/* reexport */ test) +}); + +;// CONCATENATED MODULE: ./test/unit/ts-decl/test.ts +function test(arg) { + return arg; +} + +;// CONCATENATED MODULE: ./test/unit/ts-decl/input.js -})(); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/ts-decl/output.js b/test/unit/ts-decl/output.js index 6537c54d..e2edaed3 100644 --- a/test/unit/ts-decl/output.js +++ b/test/unit/ts-decl/output.js @@ -1,51 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 250: -/***/ ((__unused_webpack_module, exports) => { - - -exports.X = true; -function test(arg) { - return arg; -} -exports.B = test; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ @@ -80,17 +36,21 @@ exports.B = test; /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { +// ESM COMPAT FLAG __nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "__esModule": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.X), -/* harmony export */ "test": () => (/* reexport safe */ _test_ts__WEBPACK_IMPORTED_MODULE_0__.B) -/* harmony export */ }); -/* harmony import */ var _test_ts__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(250); +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "test": () => (/* reexport */ test) +}); + +;// CONCATENATED MODULE: ./test/unit/ts-decl/test.ts +function test(arg) { + return arg; +} + +;// CONCATENATED MODULE: ./test/unit/ts-decl/input.js -})(); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/ts-exts/output-coverage.js b/test/unit/ts-exts/output-coverage.js index 01fdd201..133e4753 100644 --- a/test/unit/ts-exts/output-coverage.js +++ b/test/unit/ts-exts/output-coverage.js @@ -1,74 +1,36 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 119: -/***/ ((__unused_webpack_module, exports) => { - - -exports.__esModule = true; -exports.default = {}; - - -/***/ }), - -/***/ 43: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -exports.__esModule = true; -var dep_dep_js_1 = __nccwpck_require__(119); -exports.default = dep_dep_js_1["default"]; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; +/******/ })(); /******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +;// CONCATENATED MODULE: ./test/unit/ts-exts/dep-dep.ts +/* harmony default export */ const dep_dep = ({}); + +;// CONCATENATED MODULE: ./test/unit/ts-exts/dep.ts + -exports.__esModule = true; -var dep_js_1 = __nccwpck_require__(43); -console.log(dep_js_1["default"]); +;// CONCATENATED MODULE: ./test/unit/ts-exts/input.ts -})(); +console.log(dep_dep); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/ts-exts/output.js b/test/unit/ts-exts/output.js index 5df603b0..133e4753 100644 --- a/test/unit/ts-exts/output.js +++ b/test/unit/ts-exts/output.js @@ -1,74 +1,36 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 668: -/***/ ((__unused_webpack_module, exports) => { - - -exports.__esModule = true; -exports.default = {}; - - -/***/ }), - -/***/ 975: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -exports.__esModule = true; -var dep_dep_js_1 = __nccwpck_require__(668); -exports.default = dep_dep_js_1["default"]; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; +/******/ })(); /******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +;// CONCATENATED MODULE: ./test/unit/ts-exts/dep-dep.ts +/* harmony default export */ const dep_dep = ({}); + +;// CONCATENATED MODULE: ./test/unit/ts-exts/dep.ts + -exports.__esModule = true; -var dep_js_1 = __nccwpck_require__(975); -console.log(dep_js_1["default"]); +;// CONCATENATED MODULE: ./test/unit/ts-exts/input.ts -})(); +console.log(dep_dep); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/tsconfig-paths-allowjs/output-coverage.js b/test/unit/tsconfig-paths-allowjs/output-coverage.js index 348fd262..87b3af80 100644 --- a/test/unit/tsconfig-paths-allowjs/output-coverage.js +++ b/test/unit/tsconfig-paths-allowjs/output-coverage.js @@ -1,69 +1,9 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 306: -/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { - -__nccwpck_require__.r(__webpack_exports__); -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({}); - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ /************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports @@ -79,15 +19,15 @@ __nccwpck_require__.r(__webpack_exports__); /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths-allowjs/module.js +/* harmony default export */ const tsconfig_paths_allowjs_module = ({}); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(306); -console.log(_module_1["default"]); +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths-allowjs/input.ts -})(); +console.log(tsconfig_paths_allowjs_module); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/tsconfig-paths-allowjs/output.js b/test/unit/tsconfig-paths-allowjs/output.js index c8236aef..a5a844ef 100644 --- a/test/unit/tsconfig-paths-allowjs/output.js +++ b/test/unit/tsconfig-paths-allowjs/output.js @@ -42,6 +42,46 @@ module.exports = eval("require")("@module"); /******/ } /******/ /************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nccwpck_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __nccwpck_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ @@ -49,11 +89,11 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; -var exports = __webpack_exports__; +__nccwpck_require__.r(__webpack_exports__); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_module__WEBPACK_IMPORTED_MODULE_0__); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(17); -console.log(_module_1["default"]); +console.log((_module__WEBPACK_IMPORTED_MODULE_0___default())); })(); diff --git a/test/unit/tsconfig-paths-conflicting-external/output-coverage.js b/test/unit/tsconfig-paths-conflicting-external/output-coverage.js index 0024125f..fe3c7279 100644 --- a/test/unit/tsconfig-paths-conflicting-external/output-coverage.js +++ b/test/unit/tsconfig-paths-conflicting-external/output-coverage.js @@ -1,63 +1,33 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 775: -/***/ ((__unused_webpack_module, exports) => { - - -exports.__esModule = true; -exports.default = {}; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; +/******/ })(); /******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths-conflicting-external/module.ts +/* harmony default export */ const tsconfig_paths_conflicting_external_module = ({}); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(775); -console.log(_module_1["default"]); +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths-conflicting-external/input.ts -})(); +console.log(tsconfig_paths_conflicting_external_module); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/tsconfig-paths-conflicting-external/output.js b/test/unit/tsconfig-paths-conflicting-external/output.js index c8236aef..a5a844ef 100644 --- a/test/unit/tsconfig-paths-conflicting-external/output.js +++ b/test/unit/tsconfig-paths-conflicting-external/output.js @@ -42,6 +42,46 @@ module.exports = eval("require")("@module"); /******/ } /******/ /************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nccwpck_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __nccwpck_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ @@ -49,11 +89,11 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; -var exports = __webpack_exports__; +__nccwpck_require__.r(__webpack_exports__); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_module__WEBPACK_IMPORTED_MODULE_0__); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(17); -console.log(_module_1["default"]); +console.log((_module__WEBPACK_IMPORTED_MODULE_0___default())); })(); diff --git a/test/unit/tsconfig-paths/output-coverage.js b/test/unit/tsconfig-paths/output-coverage.js index 6404e61f..68abe635 100644 --- a/test/unit/tsconfig-paths/output-coverage.js +++ b/test/unit/tsconfig-paths/output-coverage.js @@ -1,63 +1,33 @@ /******/ (() => { // webpackBootstrap /******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ 520: -/***/ ((__unused_webpack_module, exports) => { - - -exports.__esModule = true; -exports.default = {}; - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; +/******/ // The require scope +/******/ var __nccwpck_require__ = {}; /******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} +/************************************************************************/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; +/******/ })(); /******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -(() => { -var exports = __webpack_exports__; +// ESM COMPAT FLAG +__nccwpck_require__.r(__webpack_exports__); + +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths/module.ts +/* harmony default export */ const tsconfig_paths_module = ({}); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(520); -console.log(_module_1["default"]); +;// CONCATENATED MODULE: ./test/unit/tsconfig-paths/input.ts -})(); +console.log(tsconfig_paths_module); module.exports = __webpack_exports__; /******/ })() diff --git a/test/unit/tsconfig-paths/output.js b/test/unit/tsconfig-paths/output.js index c8236aef..a5a844ef 100644 --- a/test/unit/tsconfig-paths/output.js +++ b/test/unit/tsconfig-paths/output.js @@ -42,6 +42,46 @@ module.exports = eval("require")("@module"); /******/ } /******/ /************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nccwpck_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __nccwpck_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __nccwpck_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __nccwpck_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ @@ -49,11 +89,11 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; -var exports = __webpack_exports__; +__nccwpck_require__.r(__webpack_exports__); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(17); +/* harmony import */ var _module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_module__WEBPACK_IMPORTED_MODULE_0__); -exports.__esModule = true; -var _module_1 = __nccwpck_require__(17); -console.log(_module_1["default"]); +console.log((_module__WEBPACK_IMPORTED_MODULE_0___default())); })();