From 4ad8846130b6415e3b4f2787883b3efd6417612d Mon Sep 17 00:00:00 2001 From: Bradley Maier Date: Tue, 24 Oct 2017 15:25:12 -0400 Subject: [PATCH] Add option to compile bundled files and .d.ts files only --- src/index.ts | 5 +- src/instances.ts | 4 +- src/interfaces.ts | 1 + .../onlyCompileBundledFiles/app.ts | 3 + .../expectedOutput-1.6/bundle.js | 71 ++++++++++++ .../expectedOutput-1.6/output.txt | 6 ++ .../expectedOutput-1.6/patch0/bundle.js | 71 ++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-1.6/patch0/output.txt | 9 ++ .../expectedOutput-1.6/patch1/bundle.js | 71 ++++++++++++ .../expectedOutput-1.6/patch1/output.txt | 6 ++ .../expectedOutput-1.7/bundle.js | 71 ++++++++++++ .../expectedOutput-1.7/output.txt | 6 ++ .../expectedOutput-1.7/patch0/bundle.js | 71 ++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-1.7/patch0/output.txt | 9 ++ .../expectedOutput-1.7/patch1/bundle.js | 71 ++++++++++++ .../expectedOutput-1.7/patch1/output.txt | 6 ++ .../expectedOutput-1.8/bundle.js | 73 +++++++++++++ .../expectedOutput-1.8/output.txt | 6 ++ .../expectedOutput-1.8/patch0/bundle.js | 73 +++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-1.8/patch0/output.txt | 9 ++ .../expectedOutput-1.8/patch1/bundle.js | 73 +++++++++++++ .../expectedOutput-1.8/patch1/output.txt | 6 ++ .../expectedOutput-2.0/bundle.js | 73 +++++++++++++ .../expectedOutput-2.0/output.txt | 6 ++ .../expectedOutput-2.0/patch0/bundle.js | 73 +++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-2.0/patch0/output.txt | 9 ++ .../expectedOutput-2.0/patch1/bundle.js | 73 +++++++++++++ .../expectedOutput-2.0/patch1/output.txt | 6 ++ .../expectedOutput-2.1/bundle.js | 101 +++++++++++++++++ .../expectedOutput-2.1/output.txt | 6 ++ .../expectedOutput-2.1/patch0/bundle.js | 101 +++++++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-2.1/patch0/output.txt | 9 ++ .../expectedOutput-2.1/patch1/bundle.js | 101 +++++++++++++++++ .../expectedOutput-2.1/patch1/output.txt | 6 ++ .../expectedOutput-2.2/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.2/output.txt | 6 ++ .../expectedOutput-2.2/patch0/bundle.js | 102 ++++++++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-2.2/patch0/output.txt | 9 ++ .../expectedOutput-2.2/patch1/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.2/patch1/output.txt | 6 ++ .../expectedOutput-2.3/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.3/output.txt | 6 ++ .../expectedOutput-2.3/patch0/bundle.js | 102 ++++++++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-2.3/patch0/output.txt | 9 ++ .../expectedOutput-2.3/patch1/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.3/patch1/output.txt | 6 ++ .../expectedOutput-2.4/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.4/output.txt | 6 ++ .../expectedOutput-2.4/patch0/bundle.js | 102 ++++++++++++++++++ .../patch0/output.transpiled.txt | 6 ++ .../expectedOutput-2.4/patch0/output.txt | 9 ++ .../expectedOutput-2.4/patch1/bundle.js | 102 ++++++++++++++++++ .../expectedOutput-2.4/patch1/output.txt | 6 ++ .../expectedOutput-2.5/bundle.js | 99 +++++++++++++++++ .../expectedOutput-2.5/output.txt | 5 + .../expectedOutput-2.5/patch0/bundle.js | 99 +++++++++++++++++ .../patch0/output.transpiled.txt | 5 + .../expectedOutput-2.5/patch0/output.txt | 9 ++ .../expectedOutput-2.5/patch1/bundle.js | 99 +++++++++++++++++ .../expectedOutput-2.5/patch1/output.txt | 5 + .../onlyCompileBundledFiles/lib/errorFile.ts | 1 + .../lib/externalLib.d.ts | 7 ++ .../lib/externalLib.js | 3 + .../onlyCompileBundledFiles/patch0/app.ts | 3 + .../onlyCompileBundledFiles/patch1/app.ts | 3 + .../submodule/submodule.ts | 5 + .../onlyCompileBundledFiles/tsconfig.json | 9 ++ .../onlyCompileBundledFiles/webpack.config.js | 21 ++++ .../expectedOutput-2.5/bundle.js | 2 +- .../expectedOutput-2.5/output.txt | 2 +- 77 files changed, 2685 insertions(+), 6 deletions(-) create mode 100644 test/comparison-tests/onlyCompileBundledFiles/app.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.transpiled.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/bundle.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/output.txt create mode 100644 test/comparison-tests/onlyCompileBundledFiles/lib/errorFile.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.d.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.js create mode 100644 test/comparison-tests/onlyCompileBundledFiles/patch0/app.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/patch1/app.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/submodule/submodule.ts create mode 100644 test/comparison-tests/onlyCompileBundledFiles/tsconfig.json create mode 100644 test/comparison-tests/onlyCompileBundledFiles/webpack.config.js diff --git a/src/index.ts b/src/index.ts index 907f3bfa8..a5e8a3574 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,7 +110,7 @@ function getLoaderOptions(loader: Webpack) { } type ValidLoaderOptions = keyof LoaderOptions; -const validLoaderOptions: ValidLoaderOptions[] = ['silent', 'logLevel', 'logInfoToStdOut', 'instance', 'compiler', 'configFile', 'transpileOnly', 'ignoreDiagnostics', 'errorFormatter', 'colors', 'compilerOptions', 'appendTsSuffixTo', 'appendTsxSuffixTo', 'entryFileCannotBeJs' /* DEPRECATED */, 'happyPackMode', 'getCustomTransformers']; +const validLoaderOptions: ValidLoaderOptions[] = ['silent', 'logLevel', 'logInfoToStdOut', 'instance', 'compiler', 'configFile', 'transpileOnly', 'ignoreDiagnostics', 'errorFormatter', 'colors', 'compilerOptions', 'appendTsSuffixTo', 'appendTsxSuffixTo', 'entryFileCannotBeJs', 'onlyCompileBundledFiles' /* DEPRECATED */, 'happyPackMode', 'getCustomTransformers']; /** * Validate the supplied loader options. @@ -146,7 +146,8 @@ function makeLoaderOptions(instanceName: string, configFileOptions: Partial, configFileOptions, loaderOptions); options.ignoreDiagnostics = arrify(options.ignoreDiagnostics).map(Number); diff --git a/src/instances.ts b/src/instances.ts index 9135b280b..67ce6fcc6 100644 --- a/src/instances.ts +++ b/src/instances.ts @@ -5,7 +5,7 @@ import chalk, { Chalk } from 'chalk'; import { makeAfterCompile } from './after-compile'; import { getConfigFile, getConfigParseResult } from './config'; -import { EOL } from './constants'; +import { EOL, dtsDtsxRegex } from './constants'; import { getCompilerOptions, getCompiler } from './compilerSetup'; import { hasOwnProperty, makeError, formatErrors, registerWebpackErrors } from './utils'; import * as logger from './logger'; @@ -118,7 +118,7 @@ function successfulTypeScriptInstance( // Load initial files (core lib files, any files specified in tsconfig.json) let normalizedFilePath: string; try { - const filesToLoad = configParseResult.fileNames; + const filesToLoad = loaderOptions.onlyCompileBundledFiles ? configParseResult.fileNames.filter(fileName => dtsDtsxRegex.test(fileName)) : configParseResult.fileNames; filesToLoad.forEach(filePath => { normalizedFilePath = path.normalize(filePath); files[normalizedFilePath] = { diff --git a/src/interfaces.ts b/src/interfaces.ts index acbc93d14..36be8953a 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -269,6 +269,7 @@ export interface LoaderOptions { transpileOnly: boolean; ignoreDiagnostics: number[]; errorFormatter: (message: ErrorInfo, colors: Chalk) => string; + onlyCompileBundledFiles: boolean; colors: boolean; compilerOptions: typescript.CompilerOptions; appendTsSuffixTo: RegExp[]; diff --git a/test/comparison-tests/onlyCompileBundledFiles/app.ts b/test/comparison-tests/onlyCompileBundledFiles/app.ts new file mode 100644 index 000000000..36f03a87a --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/app.ts @@ -0,0 +1,3 @@ +import submodule = require('./submodule/submodule'); +import externalLib = require('externalLib'); +externalLib.doSomething(submodule); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/bundle.js new file mode 100644 index 000000000..f7c4963b9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/output.txt new file mode 100644 index 000000000..b1016ce79 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.85 kB 0 [emitted] main +chunk {0} bundle.js (main) 318 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 128 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/bundle.js new file mode 100644 index 000000000..cc2a38054 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething2(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.transpiled.txt new file mode 100644 index 000000000..1e98a3d46 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.86 kB 0 [emitted] main +chunk {0} bundle.js (main) 319 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 129 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.txt new file mode 100644 index 000000000..79e1eb70e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 1.86 kB 0 [emitted] main +chunk {0} bundle.js (main) 319 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 129 bytes {0} [built] [1 error] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/bundle.js new file mode 100644 index 000000000..f7c4963b9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/output.txt new file mode 100644 index 000000000..25ebcfc07 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.6/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.85 kB 0 [emitted] main +chunk {0} bundle.js (main) 318 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 128 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/bundle.js new file mode 100644 index 000000000..f7c4963b9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/output.txt new file mode 100644 index 000000000..b1016ce79 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.85 kB 0 [emitted] main +chunk {0} bundle.js (main) 318 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 128 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/bundle.js new file mode 100644 index 000000000..cc2a38054 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething2(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.transpiled.txt new file mode 100644 index 000000000..75405247c --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.86 kB 0 [emitted] main +chunk {0} bundle.js (main) 319 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 129 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.txt new file mode 100644 index 000000000..79e1eb70e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 1.86 kB 0 [emitted] main +chunk {0} bundle.js (main) 319 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 129 bytes {0} [built] [1 error] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/bundle.js new file mode 100644 index 000000000..f7c4963b9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/bundle.js @@ -0,0 +1,71 @@ +/******/ (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__) { + + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/output.txt new file mode 100644 index 000000000..25ebcfc07 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.7/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.85 kB 0 [emitted] main +chunk {0} bundle.js (main) 318 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 128 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 135 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/bundle.js new file mode 100644 index 000000000..28e82d2ab --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/output.txt new file mode 100644 index 000000000..921e8d8b8 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/bundle.js new file mode 100644 index 000000000..bf95c2e6a --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething2(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.transpiled.txt new file mode 100644 index 000000000..fd98a4004 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.txt new file mode 100644 index 000000000..3da727888 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] [1 error] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/bundle.js new file mode 100644 index 000000000..28e82d2ab --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/output.txt new file mode 100644 index 000000000..e509994f5 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-1.8/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/bundle.js new file mode 100644 index 000000000..28e82d2ab --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/output.txt new file mode 100644 index 000000000..921e8d8b8 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/bundle.js new file mode 100644 index 000000000..bf95c2e6a --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething2(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.transpiled.txt new file mode 100644 index 000000000..fd98a4004 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.txt new file mode 100644 index 000000000..3da727888 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] [1 error] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/bundle.js new file mode 100644 index 000000000..28e82d2ab --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/bundle.js @@ -0,0 +1,73 @@ +/******/ (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__) { + + "use strict"; + var submodule = __webpack_require__(1); + var externalLib = __webpack_require__(2); + externalLib.doSomething(submodule); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + "use strict"; + var externalLib = __webpack_require__(2); + externalLib.doSomething(""); + var message = "Hello from submodule"; + module.exports = message; + + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + module.exports = { + doSomething: function() { } + } + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/output.txt new file mode 100644 index 000000000..e509994f5 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.0/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 1.89 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [rendered] + [0] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/bundle.js new file mode 100644 index 000000000..bec82dc26 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/bundle.js @@ -0,0 +1,101 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.l = 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; + +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; + +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; + +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; + +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/output.txt new file mode 100644 index 000000000..64a8ec159 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/bundle.js new file mode 100644 index 000000000..e9261ff68 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/bundle.js @@ -0,0 +1,101 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.l = 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; + +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; + +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; + +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; + +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething2(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.transpiled.txt new file mode 100644 index 000000000..f9bae63a4 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.txt new file mode 100644 index 000000000..84ee3775e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 3 kB 0 [emitted] main +chunk {0} bundle.js (main) 347 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 143 bytes {0} [built] [1 error] + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/bundle.js new file mode 100644 index 000000000..bec82dc26 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/bundle.js @@ -0,0 +1,101 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.l = 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; + +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; + +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; + +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; + +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/output.txt new file mode 100644 index 000000000..0ad63897f --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.1/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3 kB 0 [emitted] main +chunk {0} bundle.js (main) 346 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 142 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/output.txt new file mode 100644 index 000000000..a89ff0c02 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/bundle.js new file mode 100644 index 000000000..255f8fa5b --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething2(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.transpiled.txt new file mode 100644 index 000000000..d63c3b04e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.txt new file mode 100644 index 000000000..b1f15e373 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] [1 error] + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/output.txt new file mode 100644 index 000000000..486f8f1a3 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.2/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/output.txt new file mode 100644 index 000000000..a89ff0c02 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/bundle.js new file mode 100644 index 000000000..255f8fa5b --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething2(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.transpiled.txt new file mode 100644 index 000000000..d63c3b04e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.txt new file mode 100644 index 000000000..b1f15e373 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] [1 error] + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'. \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/output.txt new file mode 100644 index 000000000..486f8f1a3 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.3/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/output.txt new file mode 100644 index 000000000..a89ff0c02 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/bundle.js new file mode 100644 index 000000000..255f8fa5b --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething2(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.transpiled.txt new file mode 100644 index 000000000..d63c3b04e --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.transpiled.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.txt new file mode 100644 index 000000000..f589aea74 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 374 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] [1 error] + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +(3,13): error TS2551: Property 'doSomething2' does not exist on type 'typeof externalLib'. Did you mean 'doSomething'? \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/bundle.js new file mode 100644 index 000000000..eb5a9ebf9 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/bundle.js @@ -0,0 +1,102 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(1); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/output.txt new file mode 100644 index 000000000..486f8f1a3 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.4/patch1/output.txt @@ -0,0 +1,6 @@ + Asset Size Chunks Chunk Names +bundle.js 3.15 kB 0 [emitted] main +chunk {0} bundle.js (main) 373 bytes [entry] [rendered] + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + [2] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/bundle.js new file mode 100644 index 000000000..6024683a1 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/bundle.js @@ -0,0 +1,99 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(2); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/output.txt new file mode 100644 index 000000000..ced880992 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 2.99 kB 0 [emitted] main + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} [built] + [1] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} [built] \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/bundle.js new file mode 100644 index 000000000..0580fdcbb --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/bundle.js @@ -0,0 +1,99 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(2); +var externalLib = __webpack_require__(0); +externalLib.doSomething2(submodule); + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.transpiled.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.transpiled.txt new file mode 100644 index 000000000..e746f1740 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.transpiled.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 2.99 kB 0 [emitted] main + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.txt new file mode 100644 index 000000000..3ae4f3776 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch0/output.txt @@ -0,0 +1,9 @@ + Asset Size Chunks Chunk Names +bundle.js 2.99 kB 0 [emitted] main + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/app.ts 170 bytes {0} [built] [1 error] + [2] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} + +ERROR in ./.test/onlyCompileBundledFiles/app.ts +[tsl] ERROR in app.ts(3,13) + TS2551: Property 'doSomething2' does not exist on type 'typeof externalLib'. Did you mean 'doSomething'? \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/bundle.js b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/bundle.js new file mode 100644 index 000000000..6024683a1 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/bundle.js @@ -0,0 +1,99 @@ +/******/ (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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = { + doSomething: function() { } +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +exports.__esModule = true; +var submodule = __webpack_require__(2); +var externalLib = __webpack_require__(0); +externalLib.doSomething(submodule); + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var externalLib = __webpack_require__(0); +externalLib.doSomething(""); +var message = "Hello from submodule"; +module.exports = message; + + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/output.txt b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/output.txt new file mode 100644 index 000000000..defefc07d --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/expectedOutput-2.5/patch1/output.txt @@ -0,0 +1,5 @@ + Asset Size Chunks Chunk Names +bundle.js 2.99 kB 0 [emitted] main + [0] ./.test/onlyCompileBundledFiles/lib/externalLib.js 55 bytes {0} + [1] ./.test/onlyCompileBundledFiles/app.ts 169 bytes {0} [built] + [2] ./.test/onlyCompileBundledFiles/submodule/submodule.ts 149 bytes {0} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/lib/errorFile.ts b/test/comparison-tests/onlyCompileBundledFiles/lib/errorFile.ts new file mode 100644 index 000000000..da983bea4 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/lib/errorFile.ts @@ -0,0 +1 @@ +var a == 0; diff --git a/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.d.ts b/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.d.ts new file mode 100644 index 000000000..620892264 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.d.ts @@ -0,0 +1,7 @@ +declare module externalLib { + export function doSomething(arg: any): void; +} + +declare module 'externalLib' { + export = externalLib +} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.js b/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.js new file mode 100644 index 000000000..7733c323a --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/lib/externalLib.js @@ -0,0 +1,3 @@ +module.exports = { + doSomething: function() { } +} \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/patch0/app.ts b/test/comparison-tests/onlyCompileBundledFiles/patch0/app.ts new file mode 100644 index 000000000..728d14f32 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/patch0/app.ts @@ -0,0 +1,3 @@ +import submodule = require('./submodule/submodule'); +import externalLib = require('externalLib'); +externalLib.doSomething2(submodule); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/patch1/app.ts b/test/comparison-tests/onlyCompileBundledFiles/patch1/app.ts new file mode 100644 index 000000000..36f03a87a --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/patch1/app.ts @@ -0,0 +1,3 @@ +import submodule = require('./submodule/submodule'); +import externalLib = require('externalLib'); +externalLib.doSomething(submodule); \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/submodule/submodule.ts b/test/comparison-tests/onlyCompileBundledFiles/submodule/submodule.ts new file mode 100644 index 000000000..0ea0c5d1b --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/submodule/submodule.ts @@ -0,0 +1,5 @@ +import externalLib = require('externalLib'); + +externalLib.doSomething(""); +var message = "Hello from submodule" +export = message \ No newline at end of file diff --git a/test/comparison-tests/onlyCompileBundledFiles/tsconfig.json b/test/comparison-tests/onlyCompileBundledFiles/tsconfig.json new file mode 100644 index 000000000..f9859eca7 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + + }, + "include": [ + "./*.ts", + "lib/**/*.ts" + ] +} diff --git a/test/comparison-tests/onlyCompileBundledFiles/webpack.config.js b/test/comparison-tests/onlyCompileBundledFiles/webpack.config.js new file mode 100644 index 000000000..8e33e9476 --- /dev/null +++ b/test/comparison-tests/onlyCompileBundledFiles/webpack.config.js @@ -0,0 +1,21 @@ +var path = require('path') + +module.exports = { + entry: './app.ts', + output: { + filename: 'bundle.js' + }, + resolve: { + alias: { externalLib: path.join(__dirname, "./lib/externalLib.js") }, + extensions: ['.ts', '.js'] + }, + module: { + rules: [ + { + test: /\.ts$/, loader: 'ts-loader', options: { onlyCompileBundledFiles: true } + } + ] + } +} + + diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/bundle.js b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/bundle.js index 9ff0cfd94..31fa9c3b6 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/bundle.js +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/bundle.js @@ -67,7 +67,7 @@ /* 0 */ /***/ (function(module, exports) { -throw new Error("Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption\n\nPlease take a look at the options you are supplying; the following are valid options:\nsilent / logLevel / logInfoToStdOut / instance / compiler / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / happyPackMode / getCustomTransformers\n\n at validateLoaderOptions (C:/source/ts-loader/dist/index.js:92:19)\n at getLoaderOptions (C:/source/ts-loader/dist/index.js:75:5)\n at Object.loader (C:/source/ts-loader/dist/index.js:23:19)"); +throw new Error("Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption\n\nPlease take a look at the options you are supplying; the following are valid options:\nsilent / logLevel / logInfoToStdOut / instance / compiler / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers\n\n at validateLoaderOptions (C:/source/ts-loader/dist/index.js:92:19)\n at getLoaderOptions (C:/source/ts-loader/dist/index.js:75:5)\n at Object.loader (C:/source/ts-loader/dist/index.js:23:19)"); /***/ }) /******/ ]); \ No newline at end of file diff --git a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/output.txt b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/output.txt index 521bd3eaa..068736c1c 100644 --- a/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/output.txt +++ b/test/comparison-tests/validateLoaderOptionNames/expectedOutput-2.5/output.txt @@ -6,7 +6,7 @@ ERROR in ./.test/validateLoaderOptionNames/app.ts Module build failed: Error: ts-loader was supplied with an unexpected loader option: notRealOption Please take a look at the options you are supplying; the following are valid options: -silent / logLevel / logInfoToStdOut / instance / compiler / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / happyPackMode / getCustomTransformers +silent / logLevel / logInfoToStdOut / instance / compiler / configFile / transpileOnly / ignoreDiagnostics / errorFormatter / colors / compilerOptions / appendTsSuffixTo / appendTsxSuffixTo / entryFileCannotBeJs / onlyCompileBundledFiles / happyPackMode / getCustomTransformers at validateLoaderOptions (dist\index.js:92:19) at getLoaderOptions (dist\index.js:75:5)