From 85afd9e7b95c2449fb7cfd01182239c5c49dc468 Mon Sep 17 00:00:00 2001 From: Adam Skoufis Date: Tue, 2 Jul 2024 13:29:17 +1000 Subject: [PATCH] docs: Fix incorrect Next.js configuration (#1435) --- site/docs/integrations/next.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/docs/integrations/next.md b/site/docs/integrations/next.md index 24c403f5f..1a805696c 100644 --- a/site/docs/integrations/next.md +++ b/site/docs/integrations/next.md @@ -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