Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
export default defineConfig({ shopify: { defaultCountryCode: 'IN', defaultLanguageCode: 'EN', storeDomain: Oxygen.env.PUBLIC_STORE_DOMAIN, storefrontToken: Oxygen.env.PUBLIC_STOREFRONT_API_TOKEN, privateStorefrontToken: Oxygen.env.PRIVATE_STOREFRONT_API_TOKEN, storefrontApiVersion: '2022-07', storefrontId: Oxygen.env.PUBLIC_STOREFRONT_ID, } });
How can I access storeDomain and storeFrontToken variables defined in the 'hydrogen.config.ts' file in a component I created in the Hydrogen repo?
Hello @GkPayments
Did you find the solution?
Here is the one for Hydrogen v1.
You can use useHook hooks from @shopfy/hydrogen
const {storeDomain} = useShop()
Refer to this link