commit: b27152c3c0015c731119e8438867575e5e8e149b
parent 2ee026585e95bad73125cfc22765940603956260
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 29 Oct 2023 08:48:38 +0100
dev-nodejs/kuroshiro: fix loading by forcing it as an ESM
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dev-nodejs/kuroshiro/kuroshiro-1.2.0.ebuild b/dev-nodejs/kuroshiro/kuroshiro-1.2.0.ebuild
@@ -9,7 +9,7 @@ DESCRIPTION="Convert Japanese to Hiragana, Katakana or Romaji with furigana and
HOMEPAGE="https://kuroshiro.org/"
SRC_URI="https://github.com/hexenq/kuroshiro/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
-SLOT="0"
+SLOT="1"
KEYWORDS="~amd64"
IUSE=""
@@ -17,7 +17,12 @@ BDEPEND="dev-util/esbuild"
RESTRICT="test" # Uses jest
+src_prepare() {
+ default
+ sed -i '/"module":/a"type": "module",' package.json || die
+}
+
src_compile() {
# Uses babel by default, let's use esbuild for now instead to create a similar result
- esbuild --bundle src/index.js --outdir=lib --minify --sourcemap || die
+ esbuild --bundle src/index.js --outdir=lib --minify --sourcemap --format=esm || die
}