Skip to content

Commit 122a3a3

Browse files
asmishaKSDaemon
andauthored
feat(server-core): add fastReloadEnabled option to CompilerApi (#9289)
* 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 a73e123 commit 122a3a3

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
@@ -1963,6 +1963,9 @@ const variables: Record<string, (...args: any) => any> = {
19631963

19641964
return undefined;
19651965
},
1966+
fastReloadEnabled: () => get('CUBEJS_FAST_RELOAD_ENABLED')
1967+
.default('false')
1968+
.asBoolStrict(),
19661969
};
19671970

19681971
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
@@ -712,6 +712,7 @@ export class CubejsServerCore {
712712
sqlCache: this.options.sqlCache,
713713
standalone: this.standalone,
714714
allowNodeRequire: options.allowNodeRequire,
715+
fastReloadEnabled: options.fastReloadEnabled || getEnv('fastReloadEnabled'),
715716
},
716717
);
717718
}

0 commit comments

Comments
 (0)