Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 5278e0c

Browse files
authored
Merge pull request #242 from Cloud-Code-AI/241-add-web-rag-system
Web Rag System
2 parents bd0ebc5 + 5057f7e commit 5278e0c

File tree

28 files changed

+3995
-442
lines changed

28 files changed

+3995
-442
lines changed

docs/next.config.mjs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
/** @type {import('next').NextConfig} */
22
// import MillionLint from "@million/lint";
3+
import path from 'path';
4+
import { fileURLToPath } from 'url';
5+
6+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
37

48
const nextConfig = {
59
webpack: (config) => {
610
config.module.rules.push({
711
test: /\.json$/,
812
type: 'json',
9-
})
13+
});
14+
15+
config.resolve.alias = {
16+
...config.resolve.alias,
17+
"sharp$": false,
18+
"onnxruntime-node$": false,
19+
}
20+
21+
config.resolve.alias['@huggingface/transformers'] = path.resolve(__dirname, 'node_modules/@huggingface/transformers');
22+
1023
return config
1124
},
25+
experimental: {
26+
esmExternals: true // Enable ES modules
27+
},
1228
// i18n: {
1329
// locales: ['en', 'es', 'fr', 'de'],
1430
// defaultLocale: 'en',

0 commit comments

Comments
 (0)