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

Add Steps component to v3.mdx #8112

Merged
merged 1 commit into from
May 2, 2024
Merged
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
14 changes: 4 additions & 10 deletions src/content/docs/en/guides/upgrade-to/v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Upgrade to Astro v3
description: How to upgrade your project to the latest version of Astro (v3.0).
i18nReady: true
---
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
import { Steps } from '@astrojs/starlight/components';
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';

This guide will help you migrate from Astro v2 to Astro v3.

Expand Down Expand Up @@ -72,8 +73,6 @@ These features are now available by default:

Read more about these two exciting features and more in [the 3.0 Blog post](https://astro.build/blog/astro-3/)!



## Astro v3.0 Breaking Changes

Astro v3.0 includes some breaking changes, as well as the removal of some previously deprecated features. If your project doesn't work as expected after upgrading to v3.0, check this guide for an overview of all breaking changes and instructions on how to update your codebase.
Expand All @@ -90,21 +89,21 @@ Astro v3.0 drops Node 16 support entirely so that all Astro users can take advan

Check that both your development environment and your deployment environment are using **Node `18.14.1` or higher**.

<Steps>
1. Check your local version of Node using:

```sh
node -v
```



2. Check your [deployment environment's](/en/guides/deploy/) own documentation to verify that they support Node 18.

You can specify Node `18.14.1` for your Astro project either in a dashboard configuration setting or a `.nvmrc` file.

```bash title=".nvmrc"
18.14.1
```
</Steps>

### Removed: Support for TypeScript 4

Expand Down Expand Up @@ -317,7 +316,6 @@ An [error message indicating that `getStaticPath()`'s return value must be an ar

In Astro v2.x, [`astro check`](/en/reference/cli-reference/#astro-check) was included in Astro by default, and its dependencies were bundled in Astro. This meant a larger package whether or not you ever used `astro check`. This also prevented you from having control over the version of TypeScript and the Astro Language Server to use.


Astro v3.0 moves the `astro check` command out of Astro core and now requires an external package `@astrojs/check`. Additionally, you must install `typescript` in your project to use the `astro check` command.

#### What should I do?
Expand Down Expand Up @@ -434,7 +432,6 @@ Astro v3.0 changes the [default port](/en/reference/cli-reference/#--port-number

Update any existing references to `localhost:3000`, for example in tests or in your `README`, to reflect the new port `localhost:4321`.


### Changed default: import.meta.env.BASE_URL `trailingSlash`

In Astro v2.x, `import.meta.env.BASE_URL` appended your [`base`](/en/reference/configuration-reference/#base) setting with a [trailingSlash](/en/reference/configuration-reference/#trailingslash) by default. `trailingSlash: "ignore"` also appended a trailing slash.
Expand Down Expand Up @@ -486,7 +483,6 @@ Astro v3.0 introduces a new, default value: `"attribute"`. By default, styles ar

To retain your project's current [style scoping](/en/guides/styling/#scoped-styles), update the configuration file to the previous default value:


```js title="astro.config.mjs" ins={4}
import { defineConfig } from "astro/config";

Expand All @@ -504,7 +500,6 @@ Astro v3.0 changes the default value of `inlineStylesheets` to `"auto"`. Stylesh
#### What should I do?
If you want to keep your project's current behavior, set `build.inlineStylesheets` to the previous default, `"never"`:


```js title="astro.config.mjs" ins={4-6}
import { defineConfig } from "astro/config";

Expand Down Expand Up @@ -646,7 +641,6 @@ await devServer.stop();
await build();
```


### Changed: internal Astro API entry point export paths

In Astro v2.x, you could import internal Astro APIs from `astro/internal/*` and `astro/runtime/server/*`.
Expand Down
Loading