[X] I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.24.3
Plugin version
11.1.1
Node.js version
20.4
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
11
Description
While including this package in an ESM project that esbuild bundler is used it will throw error on runtime Error: Dynamic require of "node:crypto" is not supported
Steps to Reproduce
Setup new Fastify project
Add esbuild and output ESM (it will work until this step)
Add this plguin npm i @fastify/helmet and use it
Build using esbuild again (it will fail at runtime on this stage)
Expected Behavior
This package should provide ESM version as well so bundlers like esbuild will work with it
Prerequisites
Fastify version
4.24.3
Plugin version
11.1.1
Node.js version
20.4
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
11
Description
While including this package in an ESM project that esbuild bundler is used it will throw error on runtime
Error: Dynamic require of "node:crypto" is not supported
Steps to Reproduce
npm i @fastify/helmet
and use itExpected Behavior
This package should provide ESM version as well so bundlers like esbuild will work with it