From 87ca276216ba5c1be09e1dba6735f5f46bfe9c87 Mon Sep 17 00:00:00 2001 From: JeroenVinke Date: Sun, 2 Apr 2017 20:32:52 +0200 Subject: [PATCH] fix(sourcemap): use src as the sourceroot for sourcemaps fixes https://github.com/aurelia/cli/issues/539 --- lib/resources/content/babelrc | 1 + lib/resources/tasks/transpile.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/resources/content/babelrc b/lib/resources/content/babelrc index b45f2d782..2b0041b33 100644 --- a/lib/resources/content/babelrc +++ b/lib/resources/content/babelrc @@ -1,5 +1,6 @@ { "sourceMap": true, + "sourceRoot": "src", "moduleIds": false, "comments": false, "compact": false, diff --git a/lib/resources/tasks/transpile.ts b/lib/resources/tasks/transpile.ts index faf9be079..a50ed96e1 100644 --- a/lib/resources/tasks/transpile.ts +++ b/lib/resources/tasks/transpile.ts @@ -34,6 +34,7 @@ function buildTypeScript() { .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') })) .pipe(sourcemaps.init()) .pipe(typescriptCompiler()) + .pipe(sourcemaps.write({ sourceRoot: 'src' })) .pipe(build.bundle()); }