From 8e6e72f53a419340f6906b17b0c16fa19a748e81 Mon Sep 17 00:00:00 2001 From: Jan Klaas Kollhof Date: Wed, 26 Sep 2018 18:29:53 +1000 Subject: [PATCH] fix(loader): Handle null sourcemaps. Webpack may send `null` as sourcemaps, which is now treated as no sourcmap instead of failing. --- src/code-split.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/code-split.js b/src/code-split.js index 723bae6..bd8e5b6 100644 --- a/src/code-split.js +++ b/src/code-split.js @@ -207,10 +207,10 @@ const isHydratable = (hydratablePropPath)=> ( ); -const getAst = (source, inputSourceMap)=> ( +const getAst = (source, sourceMap)=> ( parse(source, { sourceType: 'module', - inputSourceMap + inputSourceMap: sourceMap || false }) );