Skip to content

Vite: The CJS build of Vite's Node API is deprecated. #409

@fedorovsky

Description

@fedorovsky

Search keywords

@pigment-css/vite-plugin

Latest version

  • I have tested the latest version

Summary

import { defineConfig } from 'vite'
import { pigment } from '@pigment-css/vite-plugin';
import react from '@vitejs/plugin-react'

// https://vite.dev/config/
export default defineConfig({
  plugins: [react(), pigment({})],
  optimizeDeps: {
    include: ['react-is', 'prop-types']
  }
})

Console putput:

The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

9:57:29 PM [vite] vite.config.ts changed, restarting server...
The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
9:57:29 PM [vite] (client) Re-optimizing dependencies because vite config has changed
9:57:29 PM [vite] server restarted.

Examples

No response

Motivation

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions