Added new optional ENV variable NEXT_PUBLIC_STORE_URL which makes OG image URL absolute instead of relative. Some platforms (eg. Twitter) render only OG images when a full URL is present.
fallback to NEXT_PUBLIC_VERCEL_URL is used for Vercel deployments.
Hi @dominiksipowicz , these variable names are not included in the .env.template on main branch.
Should they be to help avoid confusion?
@CraigWatt I think the NEXT_PUBLIC_STORE_URL can be added. Good spot! Thanks. Do you want to submit PR?
@dominiksipowicz just found this PR while checking out how to add more metadata for instagram + facebook. I saw you guys added Twitter here. I was wondering, are there any guidelines for adding instagram and facebook? I'd be happy to try to put something up if you point me in the right direction. Thanks!
Hi @aecorredor, The purpose of this PR was to minimise the dependencies for the commerce project and give developers more freedom to customize. If you have a lightweight implementation please submit a PR. You can use this PR as an example how to add more OG tags.
Fix ES Modules in new version of vercel/examples package
For Node.js to properly resolve relative imports they need to have the .js extension
Similarly, if the package imports a js file from a module that doesn't use exports, it also has to include the extension, so next/head becomes next/head.js
Only one example ab-testing-simple has been updated to the latest version of the UI package that's using SWC, I've changed the version in all other packages from latest to 0.3.6 which is the last one that used next-transpile-modules.
The pnpm-lock.yaml of the UI package was removed because the repo is a monorepo now
This changes continue to be part of the migration away from next-transpile-modules and to support the upcoming Next.js release.
Type of Change
[ ] New Example
[x] Example updates (Bug fixes, new features, etc.)
[x] Other (changes to the codebase, but not to examples)
New Example Checklist
[ ] 🛫 npm run new-example was used to create the example
[ ] 📚 The template wasn't used but I carefuly read the Adding a new example steps and implemented them in the example
[ ] 📱 Is it responsive? Are mobile and tablets considered?