Skip to content

Commit 72fad5d

Browse files
committed
some improvements
1 parent a8da7fc commit 72fad5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ export class DataSchemaCompiler {
129129
)],
130130
),
131131
);
132-
}
133132

134-
if (transpilationNative) {
135133
// Transpilers are the same for all files within phase.
136134
transpilerNames = this.transpilers.map(t => t.constructor.name);
135+
}
137136

137+
if (transpilationNative) {
138138
// Warming up swc compiler cache
139139
const dummyFile = {
140140
fileName: 'dummy.js',
@@ -145,7 +145,7 @@ export class DataSchemaCompiler {
145145

146146
results = await Promise.all(toCompile.map(f => this.transpileFile(f, errorsReport, { transpilerNames })));
147147
} else if (transpilationWorkerThreads) {
148-
results = await Promise.all(toCompile.map(f => this.transpileFile(f, errorsReport, { cubeNames, cubeSymbols })));
148+
results = await Promise.all(toCompile.map(f => this.transpileFile(f, errorsReport, { cubeNames, cubeSymbols, transpilerNames })));
149149
} else {
150150
results = await Promise.all(toCompile.map(f => this.transpileFile(f, errorsReport, {})));
151151
}
@@ -245,7 +245,7 @@ export class DataSchemaCompiler {
245245
const data = {
246246
fileName: file.fileName,
247247
content: file.content,
248-
transpilers: this.transpilers.map(t => t.constructor.name),
248+
transpilers: transpilerNames,
249249
cubeNames,
250250
cubeSymbols,
251251
};

0 commit comments

Comments
 (0)