From 74071b67defffbb9017d0ab494467b8b5c3d6f51 Mon Sep 17 00:00:00 2001 From: Adam Thompson <2414030+TheSonOfThomp@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:15:28 -0400 Subject: [PATCH] List all `@lg-*` scoped packages as external (#1913) * Update rollup.config.mjs * Create small-jokes-notice.md --- .changeset/small-jokes-notice.md | 5 +++++ tools/build/config/rollup.config.mjs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/small-jokes-notice.md diff --git a/.changeset/small-jokes-notice.md b/.changeset/small-jokes-notice.md new file mode 100644 index 0000000000..3b34d07a41 --- /dev/null +++ b/.changeset/small-jokes-notice.md @@ -0,0 +1,5 @@ +--- +'@lg-tools/build': minor +--- + +Adds the regex `^@lg-[a-z]+\/` to rollup's `external` property. This tells rollup to treat any `@lg-*` scoped package as external, and to not bundle it into the package. diff --git a/tools/build/config/rollup.config.mjs b/tools/build/config/rollup.config.mjs index 1a61347143..2640cb3b88 100644 --- a/tools/build/config/rollup.config.mjs +++ b/tools/build/config/rollup.config.mjs @@ -109,7 +109,7 @@ const external = [ 'typescript', /^@emotion\//, /^@leafygreen-ui\//, - /^@lg-tools\//, + /^@lg-[a-z]+\//, /^@storybook\//, /^highlight/, /^lodash\//,