Skip to content

Conversation

@LekoArts
Copy link
Contributor

@LekoArts LekoArts commented Jan 15, 2025

Description

If you look at https://unpkg.com/browse/@clerk/chrome-extension@2.1.11/dist/esm/index.js you'll see that we end up with:

import { setErrorThrowerOptions } from './chunk-BGR6KYCZ.js';
export { ... } from './chunk-BGR6KYCZ.js';
import './chunk-V7OWHRAI.js';
import '@clerk/shared/loadClerkJsScript';

setErrorThrowerOptions({ packageName: "@clerk/chrome-extension" });

The unused import '@clerk/shared/loadClerkJsScript'; is problematic because inside is "remotely hosted code" that the Chrome extension store is flagging. In #4551 build flags were added and they work. But the unused imports are not removed during bundling.

So the fix is to also mark @clerk/shared not external and bundle it. Then tsup seems to be able to remove those unused imports.

Fixes #4886

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2025

🦋 Changeset detected

Latest commit: 8c6f91f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 0:03am

@LekoArts
Copy link
Contributor Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @LekoArts - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 2.1.8-snapshot.v20250115120857
@clerk/backend 1.22.1-snapshot.v20250115120857
@clerk/chrome-extension 2.1.12-snapshot.v20250115120857
@clerk/clerk-js 5.44.1-snapshot.v20250115120857
@clerk/clerk-expo 2.6.11-snapshot.v20250115120857
@clerk/express 1.3.35-snapshot.v20250115120857
@clerk/fastify 2.1.8-snapshot.v20250115120857
@clerk/nextjs 6.9.11-snapshot.v20250115120857
@clerk/nuxt 1.0.4-snapshot.v20250115120857
@clerk/react-router 0.1.9-snapshot.v20250115120857
@clerk/remix 4.4.10-snapshot.v20250115120857
@clerk/tanstack-start 0.8.9-snapshot.v20250115120857
@clerk/testing 1.4.8-snapshot.v20250115120857
@clerk/vue 1.0.3-snapshot.v20250115120857

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/astro@2.1.8-snapshot.v20250115120857 --save-exact

@clerk/backend

npm i @clerk/backend@1.22.1-snapshot.v20250115120857 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@2.1.12-snapshot.v20250115120857 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.44.1-snapshot.v20250115120857 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.6.11-snapshot.v20250115120857 --save-exact

@clerk/express

npm i @clerk/express@1.3.35-snapshot.v20250115120857 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.1.8-snapshot.v20250115120857 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.9.11-snapshot.v20250115120857 --save-exact

@clerk/nuxt

npm i @clerk/nuxt@1.0.4-snapshot.v20250115120857 --save-exact

@clerk/react-router

npm i @clerk/react-router@0.1.9-snapshot.v20250115120857 --save-exact

@clerk/remix

npm i @clerk/remix@4.4.10-snapshot.v20250115120857 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.8.9-snapshot.v20250115120857 --save-exact

@clerk/testing

npm i @clerk/testing@1.4.8-snapshot.v20250115120857 --save-exact

@clerk/vue

npm i @clerk/vue@1.0.3-snapshot.v20250115120857 --save-exact

@LekoArts LekoArts marked this pull request as ready for review January 15, 2025 12:17
@LekoArts
Copy link
Contributor Author

Copy link
Member

@anagstef anagstef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@LekoArts LekoArts merged commit 3a03836 into main Jan 15, 2025
38 checks passed
@LekoArts LekoArts deleted the lekoarts/eco-300-chrome-web-store-rejection-mv3-remote-code-loading-issue branch January 15, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chrome Web Store Rejection - MV3 Remote Code Loading Issue

4 participants