diff --git a/README.md b/README.md index 41228d9e4..c770a01da 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,15 @@ Or if you want to use only tsx, just use the `appendTsxSuffixTo` option only: { test: /\.tsx$/, loader: 'babel-loader!ts-loader', options: { appendTsxSuffixTo: [/\.vue$/] } } ``` +#### onlyCompileBundledFiles *(boolean) (default=false)* + +The default behavior of ts-loader is to act as a drop-in replacement for the `tsc` command, +so it respects the `include`, `files`, and `exclude` options in your `tsconfig.json`, loading +any files specified by those options. The `onlyCompileBundledFiles` option modifies this behavior, +loading only those files that are actually bundled by webpack, as well as any `.d.ts` files included +by the `tsconfig.json` settings. `.d.ts` files are still included because they may be needed for +compilation without being explicitly imported, and therefore not picked up by webpack. + ### `LoaderOptionsPlugin` [There's a known "gotcha"](https://github.com/TypeStrong/ts-loader/issues/283) if you are using webpack 2 with the `LoaderOptionsPlugin`. If you are faced with the `Cannot read property 'unsafeCache' of undefined` error then you probably need to supply a `resolve` object as below: (Thanks @jeffijoe!) diff --git a/src/index.ts b/src/index.ts index 907f3bfa8..be3f3f2ff 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' /* DEPRECATED */, 'onlyCompileBundledFiles', '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-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)