diff --git a/src/index.ts b/src/index.ts index cf6b3310f..ad88b7d32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -const [major, minor] = process.version.substring(1).split('.').map(Number); +import {version} from 'node:process'; + +const [major, minor] = version.substring(1).split('.').map(Number); if (major < 22 || (major === 22 && minor < 12)) { console.error( diff --git a/tsconfig.json b/tsconfig.json index f3f15c966..5a6f084e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,8 @@ "ESNext.Iterator", "ESNext.Collection" ], - "module": "nodenext", - "moduleResolution": "nodenext", + "module": "esnext", + "moduleResolution": "bundler", "outDir": "./build", "rootDir": ".", "strict": true,