@stylexjs/nextjs-plugin

0.6.1 • Public • Published

@stylexjs/nextjs-plugin

Documentation Website

https://stylexjs.com

Installation

Install the package by using:

npm install --save-dev @stylexjs/nextjs-plugin

or with yarn:

yarn add --dev @stylexjs/nextjs-plugin

⚠️ @/ alias is unsupported at the moment.

Add the following to your .babelrc.js

module.exports = {
  presets: ['next/babel'],
  plugins: [
    [
      '@stylexjs/babel-plugin',
      {
        dev: process.env.NODE_ENV === 'development',
        runtimeInjection: false,
        genConditionalClasses: true,
        unstable_moduleResolution: {
          type: 'commonJS',
          rootDir: __dirname,
        },
      },
    ],
  ],
};

Add the following to your next.config.js

const stylexPlugin = require('@stylexjs/nextjs-plugin');

module.exports = stylexPlugin({
  rootDir: __dirname,
})({});

Readme

Keywords

none

Package Sidebar

Install

npm i @stylexjs/nextjs-plugin

Weekly Downloads

885

Version

0.6.1

License

MIT

Unpacked Size

11.7 kB

Total Files

5

Last publish

Collaborators

  • necolas
  • naman34