From ed24305d681a6c3cd0ae52a427d572bc7b3a53ee Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Wed, 25 Sep 2024 19:14:23 -0700 Subject: [PATCH] fix: add newline after "use client" for .js builds (#889) --- .changeset/stupid-impalas-join.md | 8 ++++++++ packages/react-markdown/scripts/build.mts | 2 +- packages/react-playground/scripts/build.mts | 2 +- packages/react/scripts/build.mts | 2 +- packages/tool-ui-weather/scripts/build.mts | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/stupid-impalas-join.md diff --git a/.changeset/stupid-impalas-join.md b/.changeset/stupid-impalas-join.md new file mode 100644 index 000000000..6e74065f8 --- /dev/null +++ b/.changeset/stupid-impalas-join.md @@ -0,0 +1,8 @@ +--- +"@assistant-ui/react-playground": patch +"@tool-ui/weather": patch +"@assistant-ui/react-markdown": patch +"@assistant-ui/react": patch +--- + +fix: add newline after "use client" for .js builds diff --git a/packages/react-markdown/scripts/build.mts b/packages/react-markdown/scripts/build.mts index b3247454c..471694e60 100644 --- a/packages/react-markdown/scripts/build.mts +++ b/packages/react-markdown/scripts/build.mts @@ -10,7 +10,7 @@ await build({ clean: true, esbuildOptions: (options) => { options.banner = { - js: '"use client";', + js: '"use client";\n', }; }, }); diff --git a/packages/react-playground/scripts/build.mts b/packages/react-playground/scripts/build.mts index f62d019e8..6aba9ab35 100644 --- a/packages/react-playground/scripts/build.mts +++ b/packages/react-playground/scripts/build.mts @@ -9,7 +9,7 @@ await build({ clean: true, esbuildOptions: (options) => { options.banner = { - js: '"use client";', + js: '"use client";\n', }; }, }); diff --git a/packages/react/scripts/build.mts b/packages/react/scripts/build.mts index a73acdbed..809dfc63e 100644 --- a/packages/react/scripts/build.mts +++ b/packages/react/scripts/build.mts @@ -11,7 +11,7 @@ await build({ splitting: true, esbuildOptions: (options) => { options.banner = { - js: '"use client";', + js: '"use client";\n', }; }, }); diff --git a/packages/tool-ui-weather/scripts/build.mts b/packages/tool-ui-weather/scripts/build.mts index 8b8a81b1e..dd1784d03 100644 --- a/packages/tool-ui-weather/scripts/build.mts +++ b/packages/tool-ui-weather/scripts/build.mts @@ -9,7 +9,7 @@ await build({ clean: true, esbuildOptions: (options) => { options.banner = { - js: '"use client";', + js: '"use client";\n', }; }, });