From 1dc4cdf4afecefb905d3d37560acfda099ee62ad Mon Sep 17 00:00:00 2001 From: Eli Kogan-Wang Date: Thu, 20 Mar 2025 17:12:02 +0100 Subject: [PATCH] Add support for ES module path resolution in convert.js --- utils/convert.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/convert.js b/utils/convert.js index 15bc9d82..9486ae7b 100755 --- a/utils/convert.js +++ b/utils/convert.js @@ -5,12 +5,15 @@ import { program } from 'commander'; import fs from 'fs'; import fse from 'fs-extra'; import babel from '@babel/core'; +import { fileURLToPath } from 'url'; program .option('-m, --with-source-maps [type]', 'output source maps when not generating a bundled app (type may be empty for external source maps, inline for inline source maps, or both) ') .option('--clean', 'clear the lib folder before building') .parse(process.argv); +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + // the various important paths const paths = { main: path.resolve(__dirname, '..'),