bloodymary on Nostr: A module is a is code which uses ‘export’ statement. To solve this problem I use ...
A module is a is code which uses ‘export’ statement.
To solve this problem I use Bun, it’s a runtime and a js bundler. With bun you can use both statements and it takes care about that shit.
You just have to bundle the code (build it in a single file) with a script. And target the correct environment (“node” if you want your code to be executed on the server, browser if you want it to run in the browser)
Published at
2024-03-23 07:24:22Event JSON
{
"id": "7ad8387017392caa98629eda2ded9b07630b9ffd1612630ff4b85eb6f5132084",
"pubkey": "dd86da06a7ba041622531acb23c4ec2b2dcd51bd9da5b0727de8b79d2a858b50",
"created_at": 1711178662,
"kind": 1,
"tags": [
[
"e",
"e593f2bd7022a78f808398b845b56fb94dcd8c60948357b9d92fcbaf3fbe9033",
"reply"
],
[
"p",
"9cb3545c36940d9a2ef86d50d5c7a8fab90310cc898c4344bcfc4c822ff47bca"
]
],
"content": "A module is a is code which uses ‘export’ statement.\nTo solve this problem I use Bun, it’s a runtime and a js bundler. With bun you can use both statements and it takes care about that shit.\nYou just have to bundle the code (build it in a single file) with a script. And target the correct environment (“node” if you want your code to be executed on the server, browser if you want it to run in the browser)",
"sig": "4403a1ad95fae1c9982f03ad7fcdc72fb14301b4d57c4fd93356f25949dbb8a1f1165fc98f2821eb9cb9225a06a22ae344d9d8802b79f9602f216798648bda3e"
}