From 36d384ec985ee197c27ac115e7d9722d0d2f4a0f Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Wed, 1 May 2019 08:16:58 +1000 Subject: [PATCH] fix(webpack): fix TypeScript error on unneeded test code when running webpack --- skeleton/webpack/webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skeleton/webpack/webpack.config.js b/skeleton/webpack/webpack.config.js index 9ee1b5c95..dd9616244 100644 --- a/skeleton/webpack/webpack.config.js +++ b/skeleton/webpack/webpack.config.js @@ -42,7 +42,7 @@ const cssRules = [ // @if feat.sass const sassRules = [ { - loader: "sass-loader", + loader: "sass-loader", options: { includePaths: ["node_modules"] } @@ -282,7 +282,7 @@ module.exports = ({ production, server, extractCss, coverage, analyze, karma } = }, // @endif // @if feat.typescript - { test: /\.ts$/, loader: "ts-loader" }, + { test: /\.ts$/, loader: "ts-loader", options: { reportFiles: [ srcDir+'/**/*.ts'] }, include: srcDir }, // @endif // embed small images and fonts as Data Urls and larger ones as files: { test: /\.(png|gif|jpg|cur)$/i, loader: 'url-loader', options: { limit: 8192 } },