From 990f19cac840a603eb1ec73ce7d224d377f93975 Mon Sep 17 00:00:00 2001 From: drhoden Date: Tue, 27 Feb 2018 15:51:00 -0600 Subject: [PATCH] bug(warnings): Extraneous warnings from react-apollo removed. https://github.com/apollographql/react-apollo/issues/597 --- src/loader/sourcemap.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/loader/sourcemap.ts b/src/loader/sourcemap.ts index d153aee..2c2633b 100644 --- a/src/loader/sourcemap.ts +++ b/src/loader/sourcemap.ts @@ -1,13 +1,13 @@ -import * as webpack from 'webpack' - /** * * @param loaderPath */ -export const sourcemapLoader = (loaderPath?: RegExp | undefined): webpack.Rule => { - const test = loaderPath || /\.js$/ +export const sourcemapLoader = (loaderPath?: RegExp | undefined): any => { + const test = loaderPath || /\.tsx?$/ return { + enforce: 'pre', test, - use: ['source-map-loader'] + loader: 'source-map-loader', + exclude: [/node_modules/, /build/, /__tests__/, /__test__/] } }