Wix 安装程序复制动态命名的 Angular 文件?



使用 wix 安装程序,我们的文件名是显式命名的。有没有办法抓取具有动态名称的文件?例如,在带有散列的 Angular 中,它们始终是动态的,因此这可以防止服务器上的缓存。我将它们作为静态命名,但这在新版本的生产环境中引入了许多缓存问题。

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)..distapp.bundle.js" />
</Component>
<Component Id="polyfills.bundle.js" Guid="{CB3898F1-E382-4CDD-91ED-D4E0D52332D2}">
<File Id="polyfills.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..distpolyfills.bundle.js" />
</Component>
<Component Id="styles.bundle.js" Guid="{B4E38316-CADA-4CE9-99EF-C019F6B2C3A7}">
<File Id="styles.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..diststyles.bundle.js" />
</Component>
<Component Id="vendor.bundle.js" Guid="{5A2393C4-FB11-43F6-A832-E047525C4824}">
<File Id="vendor.bundle.js" KeyPath="yes" Source="$(var.TargetDir)..distvendor.bundle.js" />
</Component>

虽然我通常对 99% 的应用程序反对这种类型的东西,但基于 NodeJS 的应用程序通常受益于使用诸如 Heat 之类的程序来动态收集文件作为预构建步骤的一部分。

您将使用主要升级并尽早安排 RemoveExistingProducts 以获得良好的体验,因为您的组件将更改每个版本。

最新更新