From 21cf2382a54d4a620d1d5d658fa928b54e15d077 Mon Sep 17 00:00:00 2001 From: Chris Friedberg Date: Fri, 18 Oct 2024 09:49:56 -0700 Subject: [PATCH] fix: reference consuming component's package.json, rather than relatively --- scripts/build/postinstall.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build/postinstall.mjs b/scripts/build/postinstall.mjs index 813e93b..e78f1a5 100644 --- a/scripts/build/postinstall.mjs +++ b/scripts/build/postinstall.mjs @@ -2,8 +2,11 @@ import chalk from 'chalk'; import { createRequire } from 'node:module'; +import { resolve } from 'path'; + + const require = createRequire(import.meta.url); -const pjson = require('../package.json'); +const pjson = require(resolve(process.cwd(), 'package.json')); console.log(chalk.hex('#f26135')(`