Skip to content

Commit

Permalink
fix: forward source file path to esbuild (#141)
Browse files Browse the repository at this point in the history
Fixes #137
  • Loading branch information
Dykam authored May 14, 2020
1 parent 79a55b5 commit b1726d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/node/esbuildService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b1726d8

Please sign in to comment.