From 7641954dfd3f95bdedea2b0c47c09b53febf3993 Mon Sep 17 00:00:00 2001 From: tomazy Date: Sun, 26 Aug 2018 22:30:07 -0400 Subject: [PATCH] Fixed ts-loader config Excluding test files see: https://github.com/TypeStrong/ts-loader/issues/544 --- tsconfig.webpack.json | 12 ++++++++++++ webpack.common.js | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tsconfig.webpack.json diff --git a/tsconfig.webpack.json b/tsconfig.webpack.json new file mode 100644 index 0000000..de2a707 --- /dev/null +++ b/tsconfig.webpack.json @@ -0,0 +1,12 @@ + +{ + "extends": "./tsconfig", + "compilerOptions": { + "sourceMap": true + }, + "exclude": [ + "src/**/*.test.ts", + "src/**/*.test.tsx", + "node_modules" + ] +} diff --git a/webpack.common.js b/webpack.common.js index 047acdb..7468914 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -14,7 +14,10 @@ module.exports = { module: { rules: [{ test: /\.tsx?$/, - loader: 'ts-loader' + loader: 'ts-loader', + options: { + configFile: 'tsconfig.webpack.json' + } }] }, plugins: [