You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+23
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,29 @@
20
20
import tasty from "./tasty.bagel" with { type: "bagel" }
21
21
```
22
22
23
+
* Support import attributes with glob-style imports ([#3797](https://github.com/evanw/esbuild/issues/3797))
24
+
25
+
This release adds support for import attributes (the `with` option) to glob-style imports (dynamic imports with certain string literal patterns as paths). These imports previously didn't support import attributes due to an oversight. So code like this will now work correctly:
26
+
27
+
```ts
28
+
async function loadLocale(locale: string): Locale {
Previously this didn't work even though esbuild normally supports forcing the JSON loader using an import attribute. Attempting to do this used to result in the following error:
35
+
36
+
```
37
+
✘ [ERROR] No loader is configured for ".data" files: locales/en-US.data
In addition, this change means plugins can now access the contents of `with` for glob-style imports.
45
+
23
46
* Support `${configDir}` in `tsconfig.json` files ([#3782](https://github.com/evanw/esbuild/issues/3782))
24
47
25
48
This adds support for a new feature from the upcoming TypeScript 5.5 release. The character sequence `${configDir}` is now respected at the start of `baseUrl` and `paths` values, which are used by esbuild during bundling to correctly map import paths to file system paths. This feature lets base `tsconfig.json` files specified via `extends` refer to the directory of the top-level `tsconfig.json` file. Here is an example:
0 commit comments