[ci] yarn format

This commit is contained in:
jonathantneal 2021-11-12 12:42:02 +00:00 committed by GitHub Actions
parent 5470fda3fe
commit 48ebbb80d4
2 changed files with 15 additions and 33 deletions

View file

@ -8,5 +8,5 @@ export default /** @type {import('astro').AstroUserConfig} */ ({
'@astrojs/renderer-preact',
// Needed for Algolia search component
'@astrojs/renderer-react',
]
],
});

View file

@ -13,18 +13,16 @@ As a result, configurations written in `snowpack.config.mjs` should be moved int
// @ts-check
/** @type {import('astro').AstroUserConfig} */
export default ({
export default {
renderers: [],
vite: {
plugins: []
}
})
plugins: [],
},
};
```
To learn more about configuring Vite, please visit their [configuration guide](https://vitejs.dev/config/).
## Aliasing
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._
## Variables in Scripts & Styles
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>
```
## Components in Markdown
In Astro v0.21, Components from any framework can be used within Markdown files.
@ -87,8 +81,6 @@ setup: |
</MyReactComponent>
```
## Environment Variables
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.
## File Extensions
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
// Div.tsx
export default function Div(props) {
return <div />
return <div />;
}
```
@ -136,7 +126,7 @@ This same change applies to styles.
```scss
// Div.scss
div {
all: unset
all: unset;
}
```
@ -145,28 +135,22 @@ div {
+ <link rel="stylesheet" href={Astro.resolve('./Div.scss')}>
```
## Plugins
In Astro v0.21, Vite plugins may be configured within `astro.config.mjs`.
```js
import { imagetools } from 'vite-imagetools'
import { imagetools } from 'vite-imagetools';
export default {
vite: {
plugins: [
imagetools()
]
}
}
plugins: [imagetools()],
},
};
```
To learn more about Vite plugins, please visit their [plugin guide](https://vitejs.dev/guide/using-plugins.html).
## Custom Renderers
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`.
[Snowpack]: https://www.snowpack.dev
[Vite]: https://vitejs.dev
[snowpack]: https://www.snowpack.dev
[vite]: https://vitejs.dev