From b1726d84e1bf694797f30c62ca509644577ef583 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 14 May 2020 15:16:22 +0200 Subject: [PATCH] fix: forward source file path to esbuild (#141) Fixes #137 --- package.json | 2 +- src/node/esbuildService.ts | 3 ++- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 31c77cc2f1d878..c6f97d6f7f513f 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "cssnano": "^4.1.10", "debug": "^4.1.1", "es-module-lexer": "^0.3.18", - "esbuild": "^0.2.6", + "esbuild": "^0.3.2", "execa": "^4.0.1", "fs-extra": "^9.0.0", "hash-sum": "^2.0.0", diff --git a/src/node/esbuildService.ts b/src/node/esbuildService.ts index 755db0510f72e1..f62f8ba029b4c8 100644 --- a/src/node/esbuildService.ts +++ b/src/node/esbuildService.ts @@ -61,7 +61,8 @@ export const transform = async ( options = { ...options, loader: options.loader || (path.extname(file).slice(1) as any), - sourcemap: true + sourcemap: true, + sourcefile: file } try { const result = await service.transform(src, options) diff --git a/yarn.lock b/yarn.lock index f5237d9c6784a0..d4c2e271a5e044 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2537,10 +2537,10 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.2.6.tgz#262b91f79de561a81e6291bad8b3a682834f5670" - integrity sha512-Kfz9T3nSRBURQDigsT+pbC85q45l7yEU5oQIik94UNPa5iY4IWY2G5HgMhrXS1U47eo6whnD3x/WZN7KkcJ/bA== +esbuild@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.3.2.tgz#3f6bdfbf51b2e776bb57952691930097b3770705" + integrity sha512-sm5o2D/nHhXSrs2D4UySNeyjSxJlgxQ6Ze2Cy6OOIJqbuDd/u6sMtiSn243bAEiyyYzlazueeryrrWJJCkv8lA== escape-html@^1.0.3: version "1.0.3"