Skip to content
Discussion options

You must be logged in to vote

Hi @sannajammeh, @derekjwilliams,

Great news! Starting from version 0.13.0-rc.1, the Next.js plugin now supports Turbopack!

The plugin now includes Turbopack configuration with CSS extraction using the PostCSS plugin.

Quick Start

For Next.js with Turbopack, use the /turbopack export:

import withStylexTurbopack from '@stylexswc/nextjs-plugin/turbopack';

export default withStylexTurbopack({
  rsOptions: {
    dev: process.env.NODE_ENV === 'development',
  },
})({
  experimental: {
    turbopack: {
      // Additional Turbopack configuration if needed
    },
  },
});

Important: You must also configure the PostCSS plugin for CSS extraction:

// postcss.config.js
module.exports = {
  plugins: {

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@derekjwilliams
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sannajammeh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants