Skip to content

Commit f208737

Browse files
committed
fix: by default bundleNow has buildTime=false and if user use CLI bundle - it sets bundleNow to true, otherwise if bundle called from code(runtime) - buildTime=false
AdminForth/1510/i-got-this-recommendation-thou
1 parent 93b2c32 commit f208737

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

adminforth/commands/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function bundle() {
1111
import { admin } from './${instance.file}.js';
1212
1313
export async function exec() {
14-
return await admin.bundleNow({ hotReload: false });
14+
return await admin.bundleNow({ hotReload: false, buildTime: true });
1515
}
1616
`);
1717

adminforth/commands/createApp/templates/index.ts.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
7878

7979
const port = 3500;
8080

81-
admin.bundleNow({ hotReload: process.env.NODE_ENV === 'development', buildTime: false }).then(() => {
81+
admin.bundleNow({ hotReload: process.env.NODE_ENV === 'development' }).then(() => {
8282
logger.info('Bundling AdminForth SPA done.');
8383
});
8484

adminforth/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ class AdminForth implements IAdminForth {
678678
}
679679

680680

681-
async bundleNow({ hotReload=false, buildTime=true }) {
681+
async bundleNow({ hotReload=false, buildTime=false }) {
682682
await this.codeInjector.bundleNow({ hotReload, buildTime });
683683
}
684684

0 commit comments

Comments
 (0)