Commit 217b2de3 authored by Tim Neutkens's avatar Tim Neutkens

Development: Switch require('typescript') to import('typescript')

parent 1fc18244
...@@ -107,9 +107,7 @@ export async function verifyTypeScriptSetup({ ...@@ -107,9 +107,7 @@ export async function verifyTypeScriptSetup({
// Load TypeScript after we're sure it exists: // Load TypeScript after we're sure it exists:
const tsPath = deps.resolved.get('typescript')! const tsPath = deps.resolved.get('typescript')!
const ts = (await Promise.resolve( const ts = (await import(tsPath)) as typeof import('typescript')
require(tsPath)
)) as typeof import('typescript')
if (semver.lt(ts.version, '4.5.2')) { if (semver.lt(ts.version, '4.5.2')) {
log.warn( log.warn(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment