Skip to content

Commit c81c946

Browse files
authored
Fix next.js config syntax (#6315)
`next.config.js` only allows commonjs syntax, not ESM. And you need to install the glob package before you can use it.
1 parent c9f3bbe commit c81c946

File tree

1 file changed

+2
-2
lines changed
  • packages/dev/docs/pages/react-spectrum

1 file changed

+2
-2
lines changed

packages/dev/docs/pages/react-spectrum/ssr.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ Media queries and DOM feature detection cannot be performed on the server becaus
293293

294294
[Next.js](https://nextjs.org) is a framework for building websites and web applications with React. It supports both server side rendering as well as static rendering. A small amount of configuration is required to get React Spectrum’s CSS working with Next.js.
295295

296-
Add the following to your `next.config.js` file. This will ensure that React Spectrum’s CSS is loaded properly by Next.js.
296+
First, install the `glob` package with npm/yarn. Then, add the following to your `next.config.js` file. This will ensure that React Spectrum’s CSS is loaded properly by Next.js.
297297

298298
```tsx
299-
import glob from 'glob';
299+
const glob = require('glob');
300300

301301
module.exports = {
302302
transpilePackages: [

0 commit comments

Comments
 (0)