sentify / next.config.ts
samyosm's picture
added Hugginface config
bb8b342
raw
history blame contribute delete
669 Bytes
import type { NextConfig } from "next";
import path from "path";
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const nextConfig: NextConfig = {
/* config options here */
output: 'standalone',
serverExternalPackages: ['sharp', 'onnxruntime-node'],
webpack: (config) => {
config.resolve.alias['@huggingface/transformers'] = path.resolve(__dirname, 'node_modules/@huggingface/transformers');
config.resolve.alias = {
...config.resolve.alias,
"sharp$": false,
"onnxruntime-node$": false,
}
return config;
},
};
export default nextConfig;