Closed vinodlait closed 8 months ago
We solved this prolem by using the Craco builder since the default builder does not support some extensions.
We just added the craco package to the dependencies, added the craco.config.ts
(since we use TypeScript on the front end) file and built it through craco build
here is the content of the configuration file
webpack: {
configure: (config: any) => ({
...config,
module: {
...config.module,
rules: config.module.rules.map((rule: any) => {
if (rule.oneOf instanceof Array) {
rule.oneOf[rule.oneOf.length - 1].exclude = [/\.(js|mjs|jsx|cjs|ts|tsx)$/, /\.html$/, /\.json$/];
}
return rule;
}),
},
}),
},
};
great to hear you fixed the issue. we're aware that some bundlers do not playing well with web vitals. If you fetch app bridge via CDN, it might avoid issues with your bundler as well. i'm going to close this ticket since you found a fix
<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>
</head>
Getting error while implementing scanner using @shopify/app-bridge :- App-Bridge failed to initialize web-vitals TypeError: web_vitals_1.onLCP is not a function
package.json
Please advice