Skip to content

Commit

Permalink
docs: Fix incorrect Next.js configuration (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis authored Jul 2, 2024
1 parent 9a5da7e commit 85afd9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions site/docs/integrations/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,18 @@ export default function App() {

```js
// next.config.js
import createVanillaExtractPlugin from '@vanilla-extract/next-plugin';
const {
createVanillaExtractPlugin
} = require('@vanilla-extract/next-plugin');
const withVanillaExtract = createVanillaExtractPlugin();

/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['@company/design-system']
};

// Next.js Vanilla Extract integration will now compile @company/design-system styles
module.exports = createVanillaExtractPlugin(nextConfig);
module.exports = withVanillaExtract(nextConfig);
```

[`transpilepackages`]: https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages

0 comments on commit 85afd9e

Please sign in to comment.