diff markdown_converter/BUILD @ 190:a2725419f988 hg-web

Updated so that bun builds will with already existing js files.
author MrJuneJune <me@mrjunejune.com>
date Sat, 24 Jan 2026 21:06:42 -0800
parents 8cf4ec5e2191
children
line wrap: on
line diff
--- a/markdown_converter/BUILD	Fri Jan 23 22:50:28 2026 -0800
+++ b/markdown_converter/BUILD	Sat Jan 24 21:06:42 2026 -0800
@@ -38,6 +38,9 @@
     "-sALLOW_MEMORY_GROWTH",  # Allow memory to grow dynamically
     "-sEXPORTED_FUNCTIONS=['_markdown_to_html','_markdown_free','_markdown_get_length','_wasm_alloc','_wasm_free']",
     "-sEXPORTED_RUNTIME_METHODS=['cwrap','ccall','UTF8ToString','stringToUTF8','lengthBytesUTF8']",
+    "-sMODULARIZE",  # Output as factory function
+    "-sEXPORT_ES6",  # Use ES6 module exports
+    "-sENVIRONMENT=web",  # Browser-only code (no Node.js builtins)
   ],
   tags=["manual"],
 )