如何使用Webpack解决在车把中找不到的404清单?

所以我想使用清单文件,但出现404 not found错误。我必须以某种方式更改路径,但是这是我的新手,而且我不知道如何配置Webpack设置。这是我的用法:

<link rel="manifest" href="../../favicons/site.webmanifest">

这是我到目前为止在webpack中尝试过的:

{
        test: /(manifest\.webmanifest|browserconfig\.xml)$/,use: [
          {
            loader: 'file-loader'
          },{
            loader: 'app-manifest-loader'
          }
        ]
      }

我的根文件夹是src,而我的favicons文件夹在src文件夹中。我的html文件位于src / html文件夹中,当我从该html文件中获取图像(位于src / images文件夹中)时,我得到的图像没有错误,因此路径正确(我认为)。

我也在使用车把。这是在webpack中的配置:

{
        test: /\.hbs$/,loader: require.resolve('handlebars-loader'),options: {
          helperDirs: path.join(__dirname,'./handlebars-helpers'),inlineRequires: '/images/'
        }
      },
a476188049 回答:如何使用Webpack解决在车把中找不到的404清单?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2992858.html

大家都在问