0

我在节点模块中安装了一个外部加载器动画依赖项。当我在本地运行它时,一切正常,但在部署应用程序后,我发现找不到该模块的脚本(“GET /lottie-player.js.map”错误(404):“未找到”)

角.json

"architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "aot": true,
            "assets": [
              "src/favicon.ico",
              "src/assets",
              "src/assets/i18n"
            ],
            "styles": [
              "src/styles.scss"
            ],
            "scripts": [
              "./node_modules/@lottiefiles/lottie-player/dist/lottie-player.js"
            ]
          },

scripts.js(在 dist 文件夹中)

{
  "version":3,
  "sources":["node_modules/@lottiefiles/lottie-player/dist/lottie-player.js"],   // error thrown is that it can't get lottie-player.js
  "names":[],
  "mappings"
}

还有其他添加脚本的方法吗?

4

0 回答 0