Skip to content

Commit

Permalink
docs(next-config): add experimental inline css docs (#73070)
Browse files Browse the repository at this point in the history
## Why?

Add documentation for experimental `inlineCss`.

```
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  experimental: {
    inlineCss: true,
  },
}
```

- x-ref: #72195
  • Loading branch information
samcx authored and wyattjoh committed Nov 28, 2024
1 parent aa83e6f commit 4aeff10
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: inlineCss
description: Enable inline CSS support.
version: experimental
---

Experimental support for inlining CSS in the `<head>`. When this flag is enabled, all places where we normally generate a `<link>` tag will instead have a generated `<style>` tag.

```ts filename="next.config.ts" switcher
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
experimental: {
inlineCss: true,
},
}

export default nextConfig
```

```js filename="next.config.js" switcher
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
inlineCss: true,
},
}

module.exports = nextConfig
```

0 comments on commit 4aeff10

Please sign in to comment.