Bonjour,

J'essai d'utiliser https://yarnpkg.com/package/tarteaucitronsj cette librairie via WebPack mais quand j'essai d’initialiser le plugin il me renvoie ça comme erreur. "Uncaught ReferenceError: tarteaucitron is not defined".

Pourtant j'ai déclarer comme ci-desous mais rien n'y fais je voie pas ce que j'ai pu oubié.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
const tarteaucitron = require('tarteaucitronjs/tarteaucitron');
 
tarteaucitron.init({
    "privacyUrl": "", /* Privacy policy url */
 
    "hashtag": "#tarteaucitron", /* Open the panel with this hashtag */
    "cookieName": "tarteaucitron", /* Cookie name */
 
    "orientation": "middle", /* Banner position (top - bottom) */
 
    "showAlertSmall": false, /* Show the small banner on bottom right */
    "cookieslist": false, /* Show the cookie list */
 
    "closePopup": false, /* Show a close X on the banner */
 
    "showIcon": true, /* Show cookie icon to manage cookies */
    "iconPosition": "BottomRight", /* BottomRight, BottomLeft, TopRight and TopLeft */
 
    "adblocker": false, /* Show a Warning if an adblocker is detected */
 
    "DenyAllCta" : true, /* Show the deny all button */
    "AcceptAllCta" : true, /* Show the accept all button when highPrivacy on */
    "highPrivacy": true, /* HIGHLY RECOMMANDED Disable auto consent */
 
    "handleBrowserDNTRequest": false, /* If Do Not Track == 1, disallow all */
 
    "removeCredit": false, /* Remove credit link */
    "moreInfoLink": true, /* Show more info link */
 
    "useExternalCss": false, /* If false, the tarteaucitron.css file will be loaded */
    "useExternalJs": false, /* If false, the tarteaucitron.js file will be loaded */
 
    //"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for multisite */
 
    "readmoreLink": "", /* Change the default readmore link */
 
    "mandatory": true, /* Show a message about mandatory cookies */
});
Merci beaucoup pour votre aide.