[ci] yarn format
This commit is contained in:
parent
5470fda3fe
commit
48ebbb80d4
2 changed files with 15 additions and 33 deletions
|
@ -8,5 +8,5 @@ export default /** @type {import('astro').AstroUserConfig} */ ({
|
||||||
'@astrojs/renderer-preact',
|
'@astrojs/renderer-preact',
|
||||||
// Needed for Algolia search component
|
// Needed for Algolia search component
|
||||||
'@astrojs/renderer-react',
|
'@astrojs/renderer-react',
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,18 +13,16 @@ As a result, configurations written in `snowpack.config.mjs` should be moved int
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/** @type {import('astro').AstroUserConfig} */
|
/** @type {import('astro').AstroUserConfig} */
|
||||||
export default ({
|
export default {
|
||||||
renderers: [],
|
renderers: [],
|
||||||
vite: {
|
vite: {
|
||||||
plugins: []
|
plugins: [],
|
||||||
}
|
},
|
||||||
})
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
To learn more about configuring Vite, please visit their [configuration guide](https://vitejs.dev/config/).
|
To learn more about configuring Vite, please visit their [configuration guide](https://vitejs.dev/config/).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Aliasing
|
## Aliasing
|
||||||
|
|
||||||
In Astro v0.21, import aliases can be added from `tsconfig.json` or `jsconfig.json`.
|
In Astro v0.21, import aliases can be added from `tsconfig.json` or `jsconfig.json`.
|
||||||
|
@ -42,8 +40,6 @@ In Astro v0.21, import aliases can be added from `tsconfig.json` or `jsconfig.js
|
||||||
|
|
||||||
_These aliases are integrated automatically into [VSCode](https://code.visualstudio.com/docs/languages/jsconfig) and other editors._
|
_These aliases are integrated automatically into [VSCode](https://code.visualstudio.com/docs/languages/jsconfig) and other editors._
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Variables in Scripts & Styles
|
## Variables in Scripts & Styles
|
||||||
|
|
||||||
In Astro v0.21, server-side variables can be passed into client-side `<style>` or `<script>`.
|
In Astro v0.21, server-side variables can be passed into client-side `<style>` or `<script>`.
|
||||||
|
@ -65,8 +61,6 @@ const colors = { foregroundColor: "rgb(221 243 228)", backgroundColor: "rgb(24 1
|
||||||
<h-tick>✓</h-tick>
|
<h-tick>✓</h-tick>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Components in Markdown
|
## Components in Markdown
|
||||||
|
|
||||||
In Astro v0.21, Components from any framework can be used within Markdown files.
|
In Astro v0.21, Components from any framework can be used within Markdown files.
|
||||||
|
@ -87,8 +81,6 @@ setup: |
|
||||||
</MyReactComponent>
|
</MyReactComponent>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
In Astro v0.21, environment variables can be loaded from `.env` files in your project directory.
|
In Astro v0.21, environment variables can be loaded from `.env` files in your project directory.
|
||||||
|
@ -111,8 +103,6 @@ In this example, `PUBLIC_ANYBODY` will be available as `import.meta.env.PUBLIC_A
|
||||||
|
|
||||||
> In prior releases, these variables were prefixed with `SNOWPACK_PUBLIC_` and required the `@snowpack/plugin-env` plugin.
|
> In prior releases, these variables were prefixed with `SNOWPACK_PUBLIC_` and required the `@snowpack/plugin-env` plugin.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## File Extensions
|
## File Extensions
|
||||||
|
|
||||||
In Astro v0.21, files need to be referenced by their actual extension, exactly as it is on disk.
|
In Astro v0.21, files need to be referenced by their actual extension, exactly as it is on disk.
|
||||||
|
@ -120,7 +110,7 @@ In Astro v0.21, files need to be referenced by their actual extension, exactly a
|
||||||
```tsx
|
```tsx
|
||||||
// Div.tsx
|
// Div.tsx
|
||||||
export default function Div(props) {
|
export default function Div(props) {
|
||||||
return <div />
|
return <div />;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -136,7 +126,7 @@ This same change applies to styles.
|
||||||
```scss
|
```scss
|
||||||
// Div.scss
|
// Div.scss
|
||||||
div {
|
div {
|
||||||
all: unset
|
all: unset;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -145,28 +135,22 @@ div {
|
||||||
+ <link rel="stylesheet" href={Astro.resolve('./Div.scss')}>
|
+ <link rel="stylesheet" href={Astro.resolve('./Div.scss')}>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
In Astro v0.21, Vite plugins may be configured within `astro.config.mjs`.
|
In Astro v0.21, Vite plugins may be configured within `astro.config.mjs`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { imagetools } from 'vite-imagetools'
|
import { imagetools } from 'vite-imagetools';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [imagetools()],
|
||||||
imagetools()
|
},
|
||||||
]
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To learn more about Vite plugins, please visit their [plugin guide](https://vitejs.dev/guide/using-plugins.html).
|
To learn more about Vite plugins, please visit their [plugin guide](https://vitejs.dev/guide/using-plugins.html).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Custom Renderers
|
## Custom Renderers
|
||||||
|
|
||||||
In Astro v0.21, plugins should now use `viteConfig()`.
|
In Astro v0.21, plugins should now use `viteConfig()`.
|
||||||
|
@ -202,7 +186,5 @@ To learn more about Vite plugins, please visit their [plugin guide](https://vite
|
||||||
|
|
||||||
> In prior releases, these were configured with `snowpackPlugin` or `snowpackPluginOptions`.
|
> In prior releases, these were configured with `snowpackPlugin` or `snowpackPluginOptions`.
|
||||||
|
|
||||||
|
[snowpack]: https://www.snowpack.dev
|
||||||
|
[vite]: https://vitejs.dev
|
||||||
[Snowpack]: https://www.snowpack.dev
|
|
||||||
[Vite]: https://vitejs.dev
|
|
||||||
|
|
Loading…
Reference in a new issue