且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 Angular Cli 自定义生成的文件名

更新时间:2022-04-30 00:37:44

从 beta.25 开始,现在通过命令选项支持它.

It's now supported via a command option as of beta.25.

这允许在构建期间通过新的构建命令选项 --output-hashing 配置输出文件名哈希.有四个可能的值:

This allows the output filename hashes to be configured during a build via a new build command option --output-hashing. There are four possible values:

none:不执行哈希

media:只向通过 [url|file]-loaders 处理的文件添加哈希值

media: only add hashes to files processed via [url|file]-loaders

bundles:只向输出包添加哈希值

bundles: only add hashes to the output bundles

all:向媒体和捆绑包添加哈希

all: add hashes to both media and bundles

none 是开发目标的默认值.all 是生产目标的默认值.

none is the default for the development target. all is the default for the production target.

更多详情此处.