-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent usage of astro:content in the client (#11827)
* Prevent usage of astro:content in the client * Fix build errors * Update .changeset/neat-dots-hear.md Co-authored-by: Emanuele Stoppa <[email protected]> * Throw an AstroError * Just throw --------- Co-authored-by: Emanuele Stoppa <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
13 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,11 @@ | ||
--- | ||
'astro': major | ||
--- | ||
|
||
Prevent usage of `astro:content` in the client | ||
|
||
Usage of `astro:content` in the client has always been discouraged because it leads to all of your content winding up in your client bundle, and can possibly leaks secrets. | ||
|
||
This formally makes doing so impossible, adding to the previous warning with errors. | ||
|
||
In the future Astro might add APIs for client-usage based on needs. |
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