From 7006a0960049432cafc11c0186655c44740308af Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Sat, 4 Dec 2021 02:09:16 +0000 Subject: [PATCH] release notes for #1799 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f36f1ace66..d1474e5cc6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +* Add `[ext]` placeholder for path templates ((https://github.com/evanw/esbuild/pull/1799)) + + This release adds the `[ext]` placeholder to the `--entry-names=`, `--chunk-names=`, and `--asset-names=` configuration options. The `[ext]` placeholder takes the value of the file extension without the leading `.`, and can be used to place output files with different file extensions into different folders. For example, `--asset-names=assets/[ext]/[name]-[hash]` might generate an output path of `assets/png/image-LSAMBFUD.png`. + + This feature was contributed by [@LukeSheard](https://github.com/LukeSheard). + * Disable star-to-clause transform for external imports ([#1801](https://github.com/evanw/esbuild/issues/1801)) When bundling is enabled, esbuild automatically transforms `import * as x from 'y'; x.z()` into `import {z} as 'y'; z()` to improve tree shaking. This avoids needing to create the import namespace object `x` if it's unnecessary, which can result in the removal of large amounts of unused code. However, this transform shouldn't be done for external imports because that incorrectly changes the semantics of the import. If the export `z` doesn't exist in the previous example, the value `x.z` is a property access that is undefined at run-time, but the value `z` is an import error that will prevent the code from running entirely. This release fixes the problem by avoiding doing this transform for external imports: