Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi! I'm new to Shopify development, so this is probably a simple question. I made a shopify app that has a working front-end, back-end, and a theme extension (page widget). So it's structured something like this:
extensions page-widget assets block.js blocks block.liquid shopify.theme.extension.toml web package.json frontend package.json package.json
The block.js file is linked to the block.liquid file in the liquid file schema.
However when I run my app locally, and open the extension in my development store, I get the "Uncaught SyntaxError: Cannot use import statement outside a module" error on my block.js file because I have an import statement there:
import { useAppQuery } from "../../../web/frontend/hooks";
I have 3 package.json files, and each has "theme": "module", so I'm not sure what else to try? It's only getting triggered in the block.js file and not any of the other .js files I have...
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025