From dc83b2cf42e085a24bbf52438f00832034c5c961 Mon Sep 17 00:00:00 2001 From: 0xpapercut <0xpapercut@gmail.com> Date: Mon, 22 Apr 2024 23:21:55 +0200 Subject: [PATCH] Add esbuild --- esbuild.config.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 esbuild.config.mjs diff --git a/esbuild.config.mjs b/esbuild.config.mjs new file mode 100644 index 0000000..325a7e6 --- /dev/null +++ b/esbuild.config.mjs @@ -0,0 +1,15 @@ +import esbuild from 'esbuild'; + +esbuild.build({ + entryPoints: ['./wypst.js'], + bundle: true, + minify: true, + sourcemap: true, + target: ['es6'], + outfile: './dist/wypst_inlined.js', + format: 'iife', + globalName: 'wypst', + loader: { + '.wasm': 'binary' + }, +});