From f24d25420fd9936ea0ebe674da57407e7ded1c29 Mon Sep 17 00:00:00 2001 From: bluwy Date: Wed, 25 Dec 2024 17:22:25 +0100 Subject: [PATCH] Externalize dependencies in esm bundle --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c6b722..e10cb03 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "types": "./types/index.d.ts", "scripts": { "bundle:global": "esbuild src/index.js --global-name=OnigurumaToES --bundle --minify --sourcemap --outfile=dist/index.min.js", - "bundle:esm": "esbuild src/index.js --format=esm --bundle --sourcemap --outfile=dist/index.mjs", + "bundle:esm": "esbuild src/index.js --format=esm --bundle --sourcemap --external:emoji-regex-xs --external:regex --external:regex-recursion --outfile=dist/index.mjs", "types": "tsc src/index.js --rootDir src --declaration --allowJs --emitDeclarationOnly --outDir types", "prebuild": "rm -rf dist/* types/*", "build": "pnpm run bundle:global && pnpm run bundle:esm && pnpm run types",