File: 0001-build-wasm-in-GOPATH-mode.patch

package info (click to toggle)
golang-github-evanw-esbuild 0.25.9-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,176 kB
  • sloc: javascript: 28,602; makefile: 856; sh: 17
file content (23 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Shengjing Zhu <zhsj@debian.org>
Date: Sun, 17 Jul 2022 01:06:40 +0800
Subject: build wasm in GOPATH mode

Forwarded: not-needed
---
 scripts/esbuild.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/esbuild.js
+++ b/scripts/esbuild.js
@@ -135,9 +135,9 @@
       '-o', path.join(npmWasmDir, 'esbuild.wasm'),
       '-ldflags=-s -w', // This removes ~0.14mb of unnecessary WebAssembly code
       '-trimpath',
-      path.join(repoDir, 'cmd', 'esbuild'),
+      './cmd/esbuild',
     ],
-    { cwd: repoDir, stdio: 'inherit', env: { ...process.env, GOOS: 'js', GOARCH: 'wasm' } },
+    { cwd: path.join(repoDir, '_build/src/github.com/evanw/esbuild'), stdio: 'inherit', env: { ...process.env, GOOS: 'js', GOARCH: 'wasm' } },
     err => err ? reject(err) : resolve()))
 
   const libDir = path.join(npmWasmDir, 'lib')