We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8639538 commit 282496dCopy full SHA for 282496d
packages/plugin-legacy/src/index.ts
@@ -38,12 +38,9 @@ import {
38
} from './snippets'
39
40
// lazy load babel since it's not used during dev
41
-let babel: typeof import('@babel/core') | undefined
+let babel: Promise<typeof import('@babel/core')> | undefined
42
async function loadBabel() {
43
- if (!babel) {
44
- babel = await import('@babel/core')
45
- }
46
- return babel
+ return (babel ??= import('@babel/core'))
47
}
48
49
// The requested module 'browserslist' is a CommonJS module
0 commit comments