Skip to content

Commit 430dafc

Browse files
authored
Merge pull request #213 from AElfProject/feature/new-function-rm
chore: 🤖 update build/webpack.common.js
2 parents 9d2d175 + c75bb52 commit 430dafc

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)