To integrate Preo Widget with Nuxt, make the following changes to your nuxt.config.js file:
-
Add the Preo JavaScript SDK to your project by including the following script tag in the
headsectionCode -
Modify compiler options to allow custom elements. This is necessary for the Preo web components to work correctly in Nuxt.
Code
TypeScript Support
To add TypeScript support for the Preo web components in your Nuxt application, create a type declaration file types/preo.d.ts:
Code
With these changes, you can now use the Preo widget in your Nuxt application. For example, you can add the widget to your page like this:
Code
Last modified on

