From f49a6c57e30a197e633e6787853dcef1ebc43b40 Mon Sep 17 00:00:00 2001 From: "alexandre.asselin" Date: Tue, 19 Dec 2023 09:19:00 -0500 Subject: [PATCH] Change build target to target es2019. Some tools (storybook) do not support ES2020 synthax. I had a super hard time changing the tool config to accept this, so instead i'm compiling hopper in an older version --- .changeset/tall-avocados-glow.md | 7 +++++++ packages/components/tsup.build.ts | 3 ++- packages/icons/tsup.build.ts | 1 + packages/styled-system/tsup.build.ts | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/tall-avocados-glow.md diff --git a/.changeset/tall-avocados-glow.md b/.changeset/tall-avocados-glow.md new file mode 100644 index 000000000..f18e787b1 --- /dev/null +++ b/.changeset/tall-avocados-glow.md @@ -0,0 +1,7 @@ +--- +"@hopper-ui/styled-system": patch +"@hopper-ui/components": patch +"@hopper-ui/icons": patch +--- + +Changed build target to target ES2019 diff --git a/packages/components/tsup.build.ts b/packages/components/tsup.build.ts index 21c38b545..ce80ff224 100644 --- a/packages/components/tsup.build.ts +++ b/packages/components/tsup.build.ts @@ -1,5 +1,6 @@ import { defineBuildConfig } from "@workleap/tsup-configs"; export default defineBuildConfig({ - entry: ["./src/**/src/*.(ts|tsx)"] + entry: ["./src/**/src/*.(ts|tsx)"], + target: "es2019" // We set target ES2019 since ES2020 syntax is not supported by older versions of storybook (used in orbiter) }); diff --git a/packages/icons/tsup.build.ts b/packages/icons/tsup.build.ts index ffa1c07d2..96b97dfa3 100644 --- a/packages/icons/tsup.build.ts +++ b/packages/icons/tsup.build.ts @@ -4,6 +4,7 @@ import packageJson from "./package.json"; export default defineBuildConfig({ entry: ["./src/**/*.(ts|tsx)"], + target: "es2019", // We set target ES2019 since ES2020 syntax is not supported by older versions of storybook (used in orbiter) esbuildPlugins: [ createCssModuleEsbuildPlugin({ generateScopedName: "[name]__[local]___[hash:base64:5]", diff --git a/packages/styled-system/tsup.build.ts b/packages/styled-system/tsup.build.ts index ffa1c07d2..96b97dfa3 100644 --- a/packages/styled-system/tsup.build.ts +++ b/packages/styled-system/tsup.build.ts @@ -4,6 +4,7 @@ import packageJson from "./package.json"; export default defineBuildConfig({ entry: ["./src/**/*.(ts|tsx)"], + target: "es2019", // We set target ES2019 since ES2020 syntax is not supported by older versions of storybook (used in orbiter) esbuildPlugins: [ createCssModuleEsbuildPlugin({ generateScopedName: "[name]__[local]___[hash:base64:5]",