Can we use @napi-rs modules in next js?
Unanswered
PixeledCode posted this in #help-forum
I am trying to use https://www.npmjs.com/package/@napi-rs/image but I am getting
Has anyone used node modules compiled from rust?
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file Has anyone used node modules compiled from rust?
1 Reply
try adding
@napi-rs/image to serverComponentsExternalPackages in your next.config/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ['@napi-rs/image']
}
};