angular - Angular Build 不工作 Base href 问题
问题描述
我正在 IIS 上部署角度构建,我认为我的主要问题是基础问题,这是我的
索引.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>KEENU CFRS</title>
<base href="/ClientApp">
<!--// "build": "ng build --base-href=/CFRS.WebUI/",-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
<app-root>
<div class="main-spinner-wrapper">
<div class="donut"></div>
</div>
</app-root>
</body>
</html>
这是我的 package.json
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
这是我的构建发布命令
ng build --prod --base-href /ClientApp/
这就是建造的地方
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
我在 dist 建立我的
这是我在 IIS 管理器中托管 Angular 构建的路径
E:\IIS Projects\ElasticCoreWebAPI_Public\feature\ClientApp\ClientApp
解决方案
推荐阅读
- python - 如何使用训练有素的 keras 模型预测数据
- python - 如何将排行榜创建为数据库
- python-3.x - 使用用户的目录来存储复制的 python3 包
- python - Python Why // 当应用于负数和正数时会给出不同的(绝对)值
- bootstrap-4 - 如何在不重新加载页面的情况下更改 Bootstrap 4 按钮
- image - Flutter中具有透明背景的图像
- reactjs - 反应 JSX 问题
- python - 如何直接在 Pandas DataFrame 中的 PDF 上计算统计指标?
- javascript - 嵌套的 promise.all
- prolog - Prolog - 数字到单词