Skip to content

Commit 1b7dddf

Browse files
asmishaKSDaemon
andauthored
feat(server-core): add fastReloadEnabled option to CompilerApi (#9290)
* feat(server-core): add fastReloadEnabled option to CompilerApi * Update packages/cubejs-server-core/src/core/server.ts Co-authored-by: Konstantin Burkalev <[email protected]> --------- Co-authored-by: Konstantin Burkalev <[email protected]>
1 parent 2fce970 commit 1b7dddf

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/cubejs-backend-shared/src/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,9 @@ const variables: Record<string, (...args: any) => any> = {
17851785

17861786
return undefined;
17871787
},
1788+
fastReloadEnabled: () => get('CUBEJS_FAST_RELOAD_ENABLED')
1789+
.default('false')
1790+
.asBoolStrict(),
17881791
};
17891792

17901793
type Vars = typeof variables;

packages/cubejs-server-core/src/core/CompilerApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class CompilerApi {
5353
compilerVersion = JSON.stringify(compilerVersion);
5454
}
5555

56-
if (this.options.devServer) {
56+
if (this.options.devServer || this.options.fastReloadEnabled) {
5757
const files = await this.repository.dataSchemaFiles();
5858
compilerVersion += `_${crypto.createHash('md5').update(JSON.stringify(files)).digest('hex')}`;
5959
}

packages/cubejs-server-core/src/core/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ export class CubejsServerCore {
689689
sqlCache: this.options.sqlCache,
690690
standalone: this.standalone,
691691
allowNodeRequire: options.allowNodeRequire,
692+
fastReloadEnabled: options.fastReloadEnabled || getEnv('fastReloadEnabled'),
692693
},
693694
);
694695
}

0 commit comments

Comments
 (0)