Skip to content

Commit

Permalink
fix: fix JSON modules new feature warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 30, 2023
1 parent 5b7217e commit 322e1c7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/babel/src/config.ts
Expand Up @@ -26,8 +26,14 @@ import pluginProposalClassProperties from '@babel/plugin-proposal-class-properti
import pluginTransformClasses from '@babel/plugin-transform-classes';
// @ts-ignore
import babelPluginTransformRenameImport from 'babel-plugin-transform-rename-import';
import pkgHelpers from '@babel/helpers/package.json' assert { type: 'json' };
import pkgRuntime from '@babel/runtime/package.json' assert { type: 'json' };
import { createRequire } from 'module';

const require = createRequire(import.meta.url);
const pkgRuntime = require('@babel/runtime/package.json');
const pkgHelpers = require('@babel/helpers/package.json');

// import pkgHelpers from '@babel/helpers/package.json' assert { type: 'json' };
// import pkgRuntime from '@babel/runtime/package.json' assert { type: 'json' };

const runtimeVersion = semver.clean(pkgRuntime.version);

Expand Down

0 comments on commit 322e1c7

Please sign in to comment.