diff --git a/.changeset/weak-cats-smash.md b/.changeset/weak-cats-smash.md
new file mode 100644
index 0000000000000000000000000000000000000000..62246011d7c0e56002e21e06ee4c3dd06cfc3fe5
--- /dev/null
+++ b/.changeset/weak-cats-smash.md
@@ -0,0 +1,5 @@
+---
+"llamaindex": patch
+---
+
+withLlamaIndex now passes through webpack options to the passed in customized NextJS webpack config. Before it was only passing through the config.
diff --git a/packages/llamaindex/src/next.ts b/packages/llamaindex/src/next.ts
index e27b524580edf6fbd4587c5a1e240ef0958aaa5e..fb8f44527a1961ac5a480665c9e318c20647f916 100644
--- a/packages/llamaindex/src/next.ts
+++ b/packages/llamaindex/src/next.ts
@@ -41,7 +41,7 @@ export default function withLlamaIndex(config: any) {
   // eslint-disable-next-line @typescript-eslint/no-explicit-any
   config.webpack = function (webpackConfig: any, options: any) {
     if (userWebpack) {
-      webpackConfig = userWebpack(webpackConfig);
+      webpackConfig = userWebpack(webpackConfig, options);
     }
     webpackConfig.resolve.alias = {
       ...webpackConfig.resolve.alias,