Skip to content

Commit

Permalink
Small updates to prepare for examples using "type": "module" (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored Sep 9, 2022
1 parent 77d3986 commit 319b1f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/en/guides/configuring-astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {}

## Supported Config File Types

Astro supports several file formats for its JavaScript configuration file: `astro.config.js`, `astro.config.mjs`, `astro.config.cjs` and `astro.config.ts`.
Astro supports several file formats for its JavaScript configuration file: `astro.config.js`, `astro.config.mjs`, `astro.config.cjs` and `astro.config.ts`. We recommend using `.mjs` in most cases or `.ts` if you want to write TypeScript in your config file.

TypeScript config file loading is handled using [`tsm`](https://github.com/lukeed/tsm) and will respect your project tsconfig options.
## Config File Resolving
Expand Down
4 changes: 2 additions & 2 deletions src/pages/en/guides/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ You can also use all of the above CSS preprocessors within JS frameworks as well

## PostCSS

Astro comes with PostCSS included as part of [Vite](https://vitejs.dev/guide/features.html#postcss). To configure PostCSS for your project, create a `postcss.config.js` file in the project root. You can import plugins using `require()` after installing them (for example `npm i autoprefixer`).
Astro comes with PostCSS included as part of [Vite](https://vitejs.dev/guide/features.html#postcss). To configure PostCSS for your project, create a `postcss.config.cjs` file in the project root. You can import plugins using `require()` after installing them (for example `npm i autoprefixer`).

```js title="postcss.config.js" ins={3-4}
```js title="postcss.config.cjs" ins={3-4}
module.exports = {
plugins: [
require('autoprefixer'),
Expand Down

0 comments on commit 319b1f5

Please sign in to comment.