使用wix安装程序,我们的文件名是显式命名的。有办法抓取具有动态名称的文件吗?例如,在使用散列的角度上,它们总是动态的,因此这防止了服务器上的缓存。我将它们命名为静态名称,但这在我们的生产环境中引入了大量的缓存问题。
app.bundle.js应该是app.bundle.343423432423323123945238.js
<Component Id="app.bundle.js" Guid="{88FF7F86-D8E1-42F0-9EEC-365342AE57DB}">
<File Id="app.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..\dist\app.bundle.js" />
</Component>
<Component Id="polyfills.bundle.js" Guid="{CB3898F1-E382-4CDD-91ED-D4E0D52332D2}">
<File Id="polyfills.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..\dist\polyfills.bundle.js" />
</Component>
<Component Id="styles.bundle.js" Guid="{B4E38316-CADA-4CE9-99EF-C019F6B2C3A7}">
<File Id="styles.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..\dist\styles.bundle.js" />
</Component>
<Component Id="vendor.bundle.js" Guid="{5A2393C4-FB11-43F6-A832-E047525C4824}">
<File Id="vendor.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..\dist\vendor.bundle.js" />
</Component>发布于 2020-05-13 23:47:07
虽然我通常在99%的应用程序中强烈反对这种类型的东西,但是基于NodeJS的应用程序通常会受益于使用诸如热这样的程序动态地获取文件,作为预构建步骤的一部分。
您将在早期使用大型升级和调度RemoveExistingProducts,以获得良好的体验,因为您的组件将更改每个构建。
https://stackoverflow.com/questions/61778213
复制相似问题