docs(supabase): document UNUSED_EXTERNAL_IMPORT build warning as false positive#2122
Merged
docs(supabase): document UNUSED_EXTERNAL_IMPORT build warning as false positive#2122
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds documentation describing known Comment |
This was referenced Feb 18, 2026
Merged
9e46dd1 to
cc06b72
Compare
grdsdev
approved these changes
Feb 18, 2026
7 tasks
mandarini
added a commit
to supabase/supabase
that referenced
this pull request
Feb 18, 2026
…rning (#42977) ## Description Adds a troubleshooting article for the `UNUSED_EXTERNAL_IMPORT` build warnings that Vite/Rollup/Nuxt users see when bundling apps that use `@supabase/supabase-js`. **File:** `apps/docs/content/troubleshooting/unused-external-import-warning-vite-rollup.mdx` ## What the article covers - What the warning looks like - Why it's a false positive (re-exported external imports not recognised as "used" by Rollup's code-body check) - `onwarn` suppression snippet for Vite/Rollup - `onwarn` suppression snippet for Nuxt ## Related - supabase/supabase-js#2010 - supabase/supabase-js#2122 --------- Co-authored-by: Chris Chinchilla <[email protected]>
GuzekAlan
added a commit
to software-mansion-labs/supabase-js
that referenced
this pull request
Feb 19, 2026
* fix(postgrest): enforce type safety for table and view names in from() method (supabase#2058) * docs(auth): clarify updateUserById does not trigger client listeners (supabase#2114) * fix(auth): resolve Firefox content script Promise.then() security errors in locks (supabase#2112) * build(deps): bump qs from 6.14.1 to 6.14.2 in the npm_and_yarn group across 1 directory (supabase#2118) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(release): version 2.96.0 changelogs (supabase#2121) Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com> * docs(supabase): document UNUSED_EXTERNAL_IMPORT build warning as false positive (supabase#2122) * feat(auth): add skipAutoInitialize option to prevent constructor auto-init (supabase#2123) * chore(release): version 2.97.0 changelogs (supabase#2124) Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Vaibhav <[email protected]> Co-authored-by: Katerina Skroumpelou <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com> Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a "Known Build Warnings" section to
packages/core/supabase-js/README.mdand a short pointer note to the rootREADME.md, addressing theUNUSED_EXTERNAL_IMPORTwarnings that Vite/Rollup/Nuxt users have been reporting (tracked in #2010).Why now
The warning appears because
supabase-jsre-exports types likePostgrestErrorandFunctionsErrorfor consumer convenience. The bundler merges all imports from the same package into a single statement, then flags re-exported names as "unused" because they only appear in anexportstatement rather than in the code body.This is a known Rollup/Vite limitation. Nothing is broken and tree-shaking is unaffected.
Changing the build output to work around a bundler heuristic would add complexity and risk for no real gain. Documentation + an
onwarnsnippet is the right fix for consumers who want clean output.Changes
packages/core/supabase-js/README.md— new "Known Build Warnings" section with explanation, Vite/Rollup snippet, Nuxt snippetREADME.md(monorepo root) — one-liner pointing to the section aboveType of Change