reaict-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

reaict

Automatically optimize React components with AI

Reaict is a Next.js / Vite / Webpack plugin that automatically analyses your React components and optimizes them for performance during build time. It uses OpenAI's gpt-3.5-turbo model to generate the optimized code.

Installation

npm install reaict-js

Usage

Next.js

// next.config.js
const withReaict = require('reaict-js');

module.exports = withReaict(
  {
    // your next.js config
  },
  { apiKey: 'YOUR_OPENAI_KEY' },
);

Create React App

const withReaict = require('reaict-js');

module.exports = {
  webpack: {
    plugins: { add: [withReaict.webpack({ auto: true })] },
  },
};

Vite

// vite.config.js
import { defineConfig } from 'vite';
import withReaict from 'reaict-js';

export default defineConfig({
  plugins: [withReaict.vite({ apiKey: 'YOUR_OPENAI_KEY' })],
});

Webpack

const withReaict = require('reaict-js');

module.exports = {
  plugins: [withReaict.webpack({ apiKey: 'YOUR_OPENAI_KEY' })],
};

Readme

Keywords

Package Sidebar

Install

npm i reaict-js

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

18 kB

Total Files

6

Last publish

Collaborators

  • abai