Skip to content

Init 3rd-party-optimizer plugin#392

Merged
kurtextrem merged 28 commits intomainfrom
plugin/gtm-lab2
Sep 8, 2025
Merged

Init 3rd-party-optimizer plugin#392
kurtextrem merged 28 commits intomainfrom
plugin/gtm-lab2

Conversation

@kurtextrem
Copy link
Copy Markdown
Member

@kurtextrem kurtextrem commented Aug 21, 2025

Description

This pull request introduces the 3rd-party-optimizer plugin.

I've introduced a VITE_CONFIG_PATH env var which plugins can set if they need to extend the global vite config in this repo. I use it to compile the yieldGTMCalls script with esbuild so the import becomes an inline import. It must be processed so that it becomes minified / JS, so e.g. ?raw can't be used.

I updated yarn as well, because it's just a minor bump. The rest comes from running yarn dedupe. Interestingly, this lead to new TS type & eslint errors, where e.g. await framer.closePlugin started erroring.

Testing

  • Open the plugin, click the button: It should add the snippet
  • Open the plugin again, the button should show "Remove": Clicking it should remove the snippet.
  • Add the snippet, disable the snippet from the settings: The plugin should tell you it's disabled and let you know how to enable it again.

@kurtextrem kurtextrem force-pushed the plugin/gtm-lab2 branch 2 times, most recently from f9ba875 to 3b7f77f Compare August 21, 2025 09:56
@kurtextrem kurtextrem marked this pull request as ready for review September 1, 2025 14:37
Comment thread plugins/3rd-party-optimizer/package.json
Comment thread plugins/csv-import/src/csv.ts Outdated
Comment thread plugins/3rd-party-optimizer/package.json
Comment thread plugins/3rd-party-optimizer/vite.config.ts Outdated
Comment thread plugins/3rd-party-optimizer/vite.config.ts Outdated
Comment thread plugins/3rd-party-optimizer/src/yieldGTMCalls.ts
Comment thread plugins/3rd-party-optimizer/package.json
Comment thread plugins/3rd-party-optimizer/vite.config.ts Outdated
Comment thread plugins/3rd-party-optimizer/src/vite-env.d.ts Outdated
Comment thread plugins/3rd-party-optimizer/src/App.css Outdated
Comment thread plugins/cms-export/src/csv.ts
Copy link
Copy Markdown
Contributor

@alecmev alecmev left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the patience! 🙏😌

@kurtextrem kurtextrem added this pull request to the merge queue Sep 8, 2025
Merged via the queue into main with commit 1d35a6f Sep 8, 2025
6 checks passed
@kurtextrem kurtextrem deleted the plugin/gtm-lab2 branch September 8, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants