Skip to content

Commit

Permalink
feat: added config param for open browser (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
exreplay committed Dec 11, 2020
1 parent 30d6a09 commit 8555805
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Object {
"i18n": Object {
"silentTranslationWarn": true,
},
"openBrowser": true,
"plugins": Array [],
"progressbar": true,
"rootDir": "/",
Expand Down
2 changes: 2 additions & 0 deletions packages/@averjs/config/lib/configs/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { I18nOptions } from 'vue-i18n';

export interface AverAppConfig {
i18n?: I18nOptions;
openBrowser?: boolean;
progressbar?:
| {
color?: string;
Expand All @@ -25,5 +26,6 @@ export default (): AverAppConfig => ({
i18n: {
silentTranslationWarn: true
},
openBrowser: true,
progressbar: true
});
2 changes: 1 addition & 1 deletion packages/@averjs/renderer/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default class Renderer {

update() {
if (this.bundle && this.clientManifest) {
if (!this.isBrowserOpen) {
if (!this.isBrowserOpen && this.config.openBrowser) {
this.isBrowserOpen = true;

let port = process.env.PORT || '3000';
Expand Down

0 comments on commit 8555805

Please sign in to comment.