Wix 安装程序复制动态命名的 Angular 文件?
Wix Installer copy dynamically named Angular files?
使用 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)..\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>
虽然我通常对 99% 的应用程序都反对这种类型的东西,但基于 NodeJS 的应用程序通常受益于使用 Heat 等程序来动态收集文件作为预构建步骤的一部分。
您将使用 Major Upgrades 并尽早安排 RemoveExistingProducts 以获得良好的体验,因为您的组件将在每次构建时发生变化。
使用 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)..\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>
虽然我通常对 99% 的应用程序都反对这种类型的东西,但基于 NodeJS 的应用程序通常受益于使用 Heat 等程序来动态收集文件作为预构建步骤的一部分。
您将使用 Major Upgrades 并尽早安排 RemoveExistingProducts 以获得良好的体验,因为您的组件将在每次构建时发生变化。