From 8c2a9b28b08520470750d31bc50024b02f4ce1aa Mon Sep 17 00:00:00 2001 From: Juraj Uhlar Date: Mon, 20 May 2024 21:45:24 +0100 Subject: [PATCH] docs(README): replace deprecated imports in code examples https://fingerprintjs.atlassian.net/browse/INTER-630 --- README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9a14f0d..7c55908 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,7 @@ import App from './App.vue'; import { fpjsPlugin, FpjsVueOptions, - // defaultEndpoint, - // defaultScriptUrlPattern, + FingerprintJSPro, } from '@fingerprintjs/fingerprintjs-pro-vue-v3'; const app = createApp(App); @@ -80,9 +79,15 @@ app .use(fpjsPlugin, { loadOptions: { apiKey: '', + endpoint: [ + // "https://metrics.yourwebsite.com", + FingerprintJSPro.defaultEndpoint + ], + scriptUrlPattern: [ + // "https://metrics.yourwebsite.com/web/v//loader_v.js", + FingerprintJSPro.defaultScriptUrlPattern + ], // region: 'eu', - // endpoint: ['metrics.yourwebsite.com', defaultEndpoint], - // scriptUrlPattern: ['metrics.yourwebsite.com/agent-path', defaultScriptUrlPattern], }, } as FpjsVueOptions) .mount('#app'); @@ -231,8 +236,7 @@ import { defineNuxtPlugin, useRuntimeConfig } from '#app'; import { fpjsPlugin, FpjsVueOptions, - // defaultEndpoint, - // defaultScriptUrlPattern, + FingerprintJSPro, } from '@fingerprintjs/fingerprintjs-pro-vue-v3'; export default defineNuxtPlugin((nuxtApp) => { @@ -241,9 +245,15 @@ export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.use(fpjsPlugin, { loadOptions: { apiKey: config.public.API_KEY, + endpoint: [ + // "https://metrics.yourwebsite.com", + FingerprintJSPro.defaultEndpoint + ], + scriptUrlPattern: [ + // "https://metrics.yourwebsite.com/web/v//loader_v.js", + FingerprintJSPro.defaultScriptUrlPattern + ], // region: 'eu', - // endpoint: ['metrics.yourwebsite.com', defaultEndpoint], - // scriptUrlPattern: ['metrics.yourwebsite.com/agent-path', defaultScriptUrlPattern], }, } as FpjsVueOptions); });