File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/src/sandbox/eval/presets/vue-cli
sandpack-core/src/transpiled-module Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ export default function initialize() {
6363 try {
6464 const vueModule = await manager . resolveTranspiledModule ( 'vue' , '/' ) ;
6565
66- if ( ! vueModule . source ) {
67- await vueModule . transpile ( manager ) ;
68- }
66+ await vueModule . transpileTree ( manager ) ;
67+
6968 const Vue = vueModule . evaluate ( manager ) ;
7069
7170 if ( Vue ) {
Original file line number Diff line number Diff line change @@ -749,6 +749,13 @@ export class TranspiledModule {
749749 ) ;
750750 }
751751
752+ /** Transpile current module and ensure the surrounding tree (dependencies and initiators) are also transpiled */
753+ async transpileTree ( manager : Manager ) : Promise < TranspiledModule > {
754+ await this . transpile ( manager ) ;
755+ await manager . verifyTreeTranspiled ( ) ;
756+ return this ;
757+ }
758+
752759 logWarnings = ( ) => {
753760 if ( this . warnings . length ) {
754761 this . warnings . forEach ( warning => {
You can’t perform that action at this time.
0 commit comments