From 2a5fb14726ce26152acb1b0c1ed5e1a9be6556db Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Mon, 15 Jul 2024 16:06:12 +0200 Subject: [PATCH] :bug: Fix nextjs package broken dynamic import --- packages/embeds/js/package.json | 2 +- packages/embeds/nextjs/package.json | 2 +- packages/embeds/nextjs/rollup.config.js | 2 +- packages/embeds/nextjs/src/index.ts | 2 +- packages/embeds/react/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json index 9a717aa12c..14bf17c457 100644 --- a/packages/embeds/js/package.json +++ b/packages/embeds/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.3.5", + "version": "0.3.6", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/embeds/nextjs/package.json b/packages/embeds/nextjs/package.json index ee42f9959d..785c9a2fee 100644 --- a/packages/embeds/nextjs/package.json +++ b/packages/embeds/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/nextjs", - "version": "0.3.5", + "version": "0.3.6", "description": "Convenient library to display typebots on your Next.js website", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/embeds/nextjs/rollup.config.js b/packages/embeds/nextjs/rollup.config.js index ce39bde90d..f14a3209b7 100644 --- a/packages/embeds/nextjs/rollup.config.js +++ b/packages/embeds/nextjs/rollup.config.js @@ -17,7 +17,7 @@ const indexConfig = { dir: './dist', format: 'es', }, - external: ['next/dynamic', 'react', 'react/jsx-runtime'], + external: ['next/dynamic.js', 'react', 'react/jsx-runtime'], watch: { clearScreen: false, }, diff --git a/packages/embeds/nextjs/src/index.ts b/packages/embeds/nextjs/src/index.ts index 0abcc863b9..e9e69985f7 100644 --- a/packages/embeds/nextjs/src/index.ts +++ b/packages/embeds/nextjs/src/index.ts @@ -3,7 +3,7 @@ import type { PopupProps, BubbleProps, } from '@typebot.io/js/dist/index' -import dynamic from 'next/dynamic' +import dynamic from 'next/dynamic.js' export const Standard: React.ComponentType< BotProps & { diff --git a/packages/embeds/react/package.json b/packages/embeds/react/package.json index e5ffa8da2b..c027b59d21 100644 --- a/packages/embeds/react/package.json +++ b/packages/embeds/react/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/react", - "version": "0.3.5", + "version": "0.3.6", "description": "Convenient library to display typebots on your React app", "main": "dist/index.js", "types": "dist/index.d.ts",