Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ~/assets alias and baseUrl from tsconfig presets. #7940

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/happy-jokes-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Remove ~/assets alias and baseUrl from tsconfig presets
2 changes: 1 addition & 1 deletion packages/astro/src/assets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export type LocalImageProps<T> = ImageSharedProps<T> & {
*
* **Example**:
* ```js
* import myImage from "~/assets/my_image.png";
* import myImage from "../assets/my_image.png";
* ```
* And then refer to the image, like so:
* ```astro
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
8 changes: 8 additions & 0 deletions packages/astro/test/fixtures/core-image-base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
8 changes: 8 additions & 0 deletions packages/astro/test/fixtures/core-image-ssg/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
8 changes: 8 additions & 0 deletions packages/astro/test/fixtures/core-image/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
5 changes: 0 additions & 5 deletions packages/astro/tsconfigs/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
"esModuleInterop": true,
// Skip typechecking libraries and .d.ts files
"skipLibCheck": true,
// Add alias for assets folder for easy reference to assets
"baseUrl": ".",
"paths": {
"~/assets/*": ["src/assets/*"]
},
// TypeScript 5.0 changed how `isolatedModules` and `importsNotUsedAsValues` works, deprecating the later
// Until the majority of users are on TypeScript 5.0, we'll have to supress those deprecation errors
"ignoreDeprecations": "5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/assets/*": ["./src/assets/*"]
}
}
}
Loading