fix: bundling issue with pnpm (#1060)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Marcus Schiesser
2024-07-22 18:37:13 +02:00
committed by GitHub
parent c69e740c56
commit ec59acd329
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
fix: bundling issue with pnpm
+6
View File
@@ -32,6 +32,12 @@ export default function withLlamaIndex(config: any) {
"@google-cloud/vertexai": false,
"groq-sdk": false,
};
// Following lines will fix issues with onnxruntime-node when using pnpm
// See: https://github.com/vercel/next.js/issues/43433
webpackConfig.externals.push({
"onnxruntime-node": "commonjs onnxruntime-node",
sharp: "commonjs sharp",
});
return webpackConfig;
};
return config;