@Dale-Lin
2022-08-04T12:57:13.000000Z
字数 453
阅读 477
webpack5
| 模板 | 描述 | level |
|---|---|---|
| [fullhash] | compilation 的完整 hash | compilation |
| [id] | chunk 的 ID | chunk |
| [name] | chunk 的名称,如果没有名称,则用 chunk id | chunk |
| [chunkhash] | chunk 所有元素组成的 hash | chunk |
| [contenthash] | 仅由 chunk 的内容元素组成的 hash(受 optimization.realContentHash 影响) |
chunk |
| [id] | 模块的 ID | Module |
| [hash] | 模块的 hash | module |
| [contenthash] | 模块内容组成的 hash | module |
| [file] | 文件名和路径,不包括 query 和 fragment | File |
| [query] | 由 ? 开头的 query |
File |
| [fragment] | 由 # 开头的 fragment |
File |
| [base] | 文件名 | File |
| [path] | 路径 | File |
| [name] | 不包含后缀的文件名 | File |
| [ext] | 由 . 开头的后缀( output.filename 不支持) |
File |
| [url] | URL | URL |
