fastify / fastify-vite

Fastify plugin for Vite integration.
MIT License
849 stars 71 forks source link

Trace: The CJS build of Vite's Node API is deprecated #122

Closed felixmosh closed 9 months ago

felixmosh commented 9 months ago

Prerequisites

Fastify version

4.24.3

Plugin version

5.0.1

Node.js version

18.7

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

11.3

Description

Vite v5 started to warn regarding deprecating cjs usage, I've tracked it down to this lib.

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

Steps to Reproduce

Update to Vite v5, and run build / dev

Expected Behavior

This lib should use the esm as suggested by Vite.