File size: 669 Bytes
7349480 f43196f 7349480 bb8b342 f5d25f5 f43196f 7349480 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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;
|