generated from florian-lefebvre/astro-integration-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: new build import bugs and types noop (#91)
Co-authored-by: Florian Lefebvre <[email protected]>
- Loading branch information
1 parent
694d254
commit 23a41b8
Showing
7 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"astro-integration-kit": patch | ||
--- | ||
|
||
Fixes runtime error when importing the new DB type extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"astro-integration-kit": patch | ||
--- | ||
|
||
Fixes ESM import resolution after new build step |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Type-only import is not supported with the nice syntax for modules across packages. | ||
* This requires libraries using the extended types provided by AIK with one of the syntaxes below: | ||
* - `import type {} from 'astro-integration-kit/types/db';` with the empty `{}` | ||
* - `/// <reference types="astro-integration-kit/types/db" />` with the triple-slash directive` | ||
* | ||
* None of those are as nice as simply `import 'astro-integration-kit/types/db';`. | ||
* | ||
* Using the plain import means it will attempt to import a JS file during module resolution, | ||
* which would fail at runtime because the type extensions are only available as types. | ||
* | ||
* As a workaround for that, this file exists. The type extensions are declared in the package.json | ||
* with this file as their runtime counterpart, so the import will succeed and not throw at runtime. | ||
* | ||
* This file is a no-op, it does nothing. It is just a placeholder to make the nice import work. | ||
* | ||
* @see https://discord.com/channels/830184174198718474/1197638002764152843/1220528418035208212 | ||
*/ |