From 78ae9705133eaea53da75abcb1c6577afbc2be01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20T=C3=B6rnqvist?= Date: Thu, 5 Apr 2018 09:33:50 +0200 Subject: [PATCH] Add source map support for stack traces --- lib/graph-script.js | 5 ++++- package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/graph-script.js b/lib/graph-script.js index eb4fa736..4eac5c8d 100644 --- a/lib/graph-script.js +++ b/lib/graph-script.js @@ -76,7 +76,9 @@ function node (state, createEdge) { babelrc: true, presets: babelPresets }) - b.transform(brfs, { global: true }) + b.transform(tfilter(brfs, { exclude: /source-map-support/ }), { + global: true + }) b.transform(yoyoify, { global: true }) if (!fullPaths) b.plugin(cssExtract, { out: bundleStyles }) @@ -109,6 +111,7 @@ function node (state, createEdge) { NODE_ENV: 'development' }, process.env) b.transform(envify(env), { global: true }) + b.add(require.resolve('source-map-support/register')) } bundleScripts() diff --git a/package.json b/package.json index ad4fe4d1..25e86ed0 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "send": "^0.16.1", "server-router": "^6.0.0", "sheetify": "^7.1.0", + "source-map-support": "^0.5.4", "split-require": "^3.0.1", "split2": "^2.2.0", "strip-ansi": "^4.0.0",