Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/app/src/sandbox/eval/presets/vue-cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ export default function initialize() {
try {
const vueModule = await manager.resolveTranspiledModule('vue', '/');

if (!vueModule.source) {
await vueModule.transpile(manager);
}
await vueModule.transpileTree(manager);

const Vue = vueModule.evaluate(manager);

if (Vue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,13 @@ export class TranspiledModule {
);
}

/** Transpile current module and ensure the surrounding tree (dependencies and initiators) are also transpiled */
async transpileTree(manager: Manager): Promise<TranspiledModule> {
await this.transpile(manager);
await manager.verifyTreeTranspiled();
return this;
}

logWarnings = () => {
if (this.warnings.length) {
this.warnings.forEach(warning => {
Expand Down