From c75bb52df35c89cffb021fb03d21194e2ab62359 Mon Sep 17 00:00:00 2001 From: hzz780 Date: Thu, 11 Sep 2025 18:08:33 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20build/webpack.?= =?UTF-8?q?common.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.common.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/webpack.common.js b/build/webpack.common.js index d36b55e8..b98f82a0 100644 --- a/build/webpack.common.js +++ b/build/webpack.common.js @@ -1,10 +1,11 @@ /* eslint-env node */ import path from 'path'; import webpack from 'webpack'; +import { createRequire } from 'module'; import { ROOT } from './utils.js'; -const pkg = await import(path.resolve(ROOT, './package.json'), { - assert: { type: 'json' } -}); + +const require = createRequire(import.meta.url); +const pkg = require(path.resolve(ROOT, './package.json')); const { version, name } = pkg; const banner = `${name}.js v${version} \n(c) 2019-${new Date().getFullYear()} AElf \nReleased under MIT License`;