0

我正在尝试在我的 PCF 控件中使用 Bootstrap 图标,但我在显示图标时遇到了问题,因为没有包含字体

包括 Bootstrap-Icons:npm i bootstrap-icons产生以下package.json

{
  "name": "pcf-project",
  "version": "1.0.0",
  "description": "Project containing your PowerApps Component Framework (PCF) control.",
  "homepage": ".",
  "scripts": {
    "build": "pcf-scripts build",
    "clean": "pcf-scripts clean",
    "rebuild": "pcf-scripts rebuild",
    "start": "pcf-scripts start"
  },
  "dependencies": {
    "@types/node": "^10.12.18",
    "@types/powerapps-component-framework": "^1.2.0",
    "bootstrap": "^5.0.2",
    "bootstrap-datepicker": "^1.9.0",
    "bootstrap-icons": "^1.5.0",
    "jquery": "^3.6.0"
  },
  "devDependencies": {
    "@types/bootstrap": "^5.0.16",
    "@types/bootstrap-datepicker": "0.0.14",
    "@types/jquery": "^3.5.5",
    "pcf-scripts": "^1",
    "pcf-start": "^1"
  }
}

但是当我跑步时,我npm start看不到图标。

如何告诉npm build命令包含fonts目录?

网络面板

4

1 回答 1

0

目前,框架不支持字体资源(文件扩展名为 .ttf 的文件)。

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/faq#can-i-bundle-font-resources

于 2021-09-20T05:12:44.997 回答