summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ludovico Fischer <43557+ludofischer@users.noreply.github.com> 2021-11-29 21:39:38 +0100
committerGravatar GitHub <noreply@github.com> 2021-11-29 13:39:38 -0700
commit0f5e89f694718242816d752ff38f4fb4f2e8e50a (patch)
treee6b5031a37df1cea3b7309246054843ff74f21d4
parentc1d792dcdbca943087423dcb4b4e0a41540a86da (diff)
downloadastro-0f5e89f694718242816d752ff38f4fb4f2e8e50a.tar.gz
astro-0f5e89f694718242816d752ff38f4fb4f2e8e50a.tar.zst
astro-0f5e89f694718242816d752ff38f4fb4f2e8e50a.zip
docs: update some Snowpack references to Vite (#2035)
* docs: update some Snowpack references to Vite Vite has replaced Snowpack in 0.21. * Apply suggestions from code review Co-authored-by: Drew Powers <1369770+drwpow@users.noreply.github.com> Co-authored-by: Drew Powers <1369770+drwpow@users.noreply.github.com>
-rw-r--r--docs/reference/api-reference.md2
-rw-r--r--docs/src/pages/guides/imports.md6
-rw-r--r--docs/src/pages/reference/api-reference.md2
3 files changed, 5 insertions, 5 deletions
diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md
index e997a1859..ae1cb2e9b 100644
--- a/docs/reference/api-reference.md
+++ b/docs/reference/api-reference.md
@@ -180,7 +180,7 @@ Astro will generate an RSS 2.0 feed at `/feed/[collection].xml` (for example, `/
## `import.meta`
-All ESM modules include a `import.meta` property. Astro adds `import.meta.env` through [Snowpack](https://www.snowpack.dev/).
+All ESM modules include a `import.meta` property. Astro adds `import.meta.env` through [Vite](https://vitejs.dev/guide/env-and-mode.html).
**import.meta.env.SSR** can be used to know when rendering on the server. Sometimes you might want different logic, for example a component that should only be rendered in the client:
diff --git a/docs/src/pages/guides/imports.md b/docs/src/pages/guides/imports.md
index a52d1aa9d..01fa913ce 100644
--- a/docs/src/pages/guides/imports.md
+++ b/docs/src/pages/guides/imports.md
@@ -4,7 +4,7 @@ title: Supported Imports
description: Learn how to import different content types with Astro.
---
-Astro uses Snowpack as its internal build system. Snowpack provides Astro with built-in support for the following file types, with no configuration required:
+Astro uses Vite as its internal build system. Vite provides Astro with built-in support for the following file types, with no configuration required:
- JavaScript (`.js`, `.mjs`)
- TypeScript (`.ts`, `.tsx`)
@@ -17,7 +17,7 @@ Astro uses Snowpack as its internal build system. Snowpack provides Astro with
- Markdown (`.md`)
- WASM (`.wasm`)
-Any files in your `public/` directory are copied into the final build, untouched by Snowpack or Astro. The following applies to files in your `src/` directory, which Astro is ultimately responsible for.
+Any files in your `public/` directory are copied into the final build, untouched by Vite or Astro. The following applies to files in your `src/` directory, which Astro is ultimately responsible for.
## JavaScript & ESM
@@ -120,7 +120,7 @@ import ReactDOM from 'react-dom';
Astro lets you import npm packages directly in the browser. Even if a package was published using a legacy format, Astro will up-convert the package to ESM before serving it to the browser.
-When you start up your dev server or run a new build, you may see a message that Snowpack is "installing dependencies". This means that Snowpack is converting your dependencies to run in the browser. This needs to run only once, or until you next change your dependency tree by adding or removing dependencies.
+When you start up your dev server or run a new build, you may see a message that Vite is "installing dependencies". This means that Vite is converting your dependencies to run in the browser. This needs to run only once, or until you next change your dependency tree by adding or removing dependencies.
## Node Builtins
diff --git a/docs/src/pages/reference/api-reference.md b/docs/src/pages/reference/api-reference.md
index ad0afd584..4722da822 100644
--- a/docs/src/pages/reference/api-reference.md
+++ b/docs/src/pages/reference/api-reference.md
@@ -277,7 +277,7 @@ interface RSSArgument {
> In this section we use `[dot]` to mean `.`. This is because of a bug in our build engine that is rewriting `import[dot]meta[dot]env` if we use `.` instead of `[dot]`.
-All ESM modules include a `import.meta` property. Astro adds `import[dot]meta[dot]env` through [Snowpack](https://www.snowpack.dev/).
+All ESM modules include a `import.meta` property. Astro adds `import[dot]meta[dot]env` through [Vite](https://vitejs.dev/guide/env-and-mode.html).
**`import[dot]meta[dot]env[dot]SSR`** can be used to know when rendering on the server. Sometimes you might want different logic, for example a component that should only be rendered in the client: