/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Show HN: Write Go code in JavaScript files
(www.npmjs.com)
153 points
yar-kravtsov
| 1 comments |
27 Oct 25 05:36 UTC
|
HN request time: 0.195s
|
source
I built a Vite plugin that lets you write Go code directly in .js files using a "use golang" directive. It compiles to WebAssembly automatically.
Show context
tkzed49
◴[
27 Oct 25 09:55 UTC
]
No.
45719084
[source]
▶
>>45717724 (OP)
#
Beautiful. Minor feedback: rather than having a "use golang" directive, just allow imports of .go files. This is more idiomatic for JS bundlers.
replies(4):
>>45720617
#
>>45720828
#
>>45721171
#
>>45727246
#
1.
◴[
27 Oct 25 22:48 UTC
]
No.
45727246
[source]
▶
>>45719084
#
ID:
GO
↑