diff --git a/packages/ember-repl/addon/src/compile/formats/gjs/index.ts b/packages/ember-repl/addon/src/compile/formats/gjs/index.ts index 8daa3c91b..855ef2fc5 100644 --- a/packages/ember-repl/addon/src/compile/formats/gjs/index.ts +++ b/packages/ember-repl/addon/src/compile/formats/gjs/index.ts @@ -91,7 +91,9 @@ async function transform( ): Promise> { // @babel/standalone is a CJS module.... // so we have to use the default export (which is all the exports) - let babel = (await import('@babel/standalone')).default as Babel; + let maybeBabel = (await import('@babel/standalone')) as Babel; + // Handle difference between vite and webpack in consuming projects... + let babel = 'default' in maybeBabel ? maybeBabel.default : maybeBabel; return babel.transform(intermediate, { filename: `${name}.js`,