Skip to content

Commit

Permalink
feat(env): 生产模式增强和环境文件配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Encaik committed Sep 28, 2024
1 parent d4432d0 commit fcfd73f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"maximumError": "4kB"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
Expand Down
7 changes: 7 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { enableProdMode } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { inject } from '@vercel/analytics';
import { injectSpeedInsights } from '@vercel/speed-insights';
import { environment } from 'environments/environment';

import { AppComponent } from './app/app.component';
import { appConfig } from './app/app.config';

injectSpeedInsights();
inject();

if (environment.production) {
enableProdMode();
}

bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));

1 comment on commit fcfd73f

@vercel
Copy link

@vercel vercel bot commented on fcfd73f Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wanjie – ./

wanjie-git-main-encaiks-projects.vercel.app
wanjie-encaiks-projects.vercel.app
wanjie.vercel.app

Please sign in to comment.