Skip to content

Commit c75bb52

Browse files
committed
chore: 🤖 update build/webpack.common.js
1 parent cb831df commit c75bb52

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎build/webpack.common.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/* eslint-env node */
22
import path from 'path';
33
import webpack from 'webpack';
4+
import { createRequire } from 'module';
45
import { ROOT } from './utils.js';
5-
const pkg = await import(path.resolve(ROOT, './package.json'), {
6-
assert: { type: 'json' }
7-
});
6+
7+
const require = createRequire(import.meta.url);
8+
const pkg = require(path.resolve(ROOT, './package.json'));
89
const { version, name } = pkg;
910

1011
const banner = `${name}.js v${version} \n(c) 2019-${new Date().getFullYear()} AElf \nReleased under MIT License`;

0 commit comments

Comments
 (0)