diff --git a/integrations/nextjs-plugin/src/build.ts b/integrations/nextjs-plugin/src/build.ts
index 0f1852b7a..299675891 100644
--- a/integrations/nextjs-plugin/src/build.ts
+++ b/integrations/nextjs-plugin/src/build.ts
@@ -11,13 +11,12 @@ export default ({
   staticFolder,
   webPack,
   ...rest
-}: CompileProps) => (phase: string, nextConfig: any) => {
+}: CompileProps) => () => {
   return {
     /**
      * we need some async function, to make sure the compilation process is completed
      */
     async headers() {
-      const { defaultConfig } = nextConfig;
       const userProps: CompileProps = {
         bundleName,
         configPath,
@@ -27,7 +26,7 @@ export default ({
         presets: presets || defaultPresets,
         distFolder: path.resolve(__dirname),
         staticFolder:
-          staticFolder || path.join(process.cwd(), defaultConfig.distDir),
+          staticFolder || path.join(process.cwd(), 'public', 'static'),
         ...userProps,
       };