Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use this library in Nuxt 2 #420

Closed
YourItalianChef opened this issue Nov 19, 2022 · 1 comment
Closed

How use this library in Nuxt 2 #420

YourItalianChef opened this issue Nov 19, 2022 · 1 comment

Comments

@YourItalianChef
Copy link

Hey,
i want to describe how to use this library in nuxt 2.

Step 1:
npm i vanilla-cookieconsent

Step 2:
create config file JS into folder of plugins => YourNameOfFile.js

YOUR CONFIG
const CookiesConsent = window.initCookieConsent()

CookiesConsent.run({})

Step 3:
config nuxt.config.js add text below

css: [
'./node_modules/vanilla-cookieconsent/dist/cookieconsent.css'
]

plugins: [
{ src: './node_modules/vanilla-cookieconsent/dist/cookieconsent.js', mode: 'client' },
{ src: './plugins/YourNameOfFile.js', mode: 'client' }
]

Step 4:
make a cup of coffee and enjoy

@orestbida
Copy link
Owner

There's also a guide for nuxt2 here: #42 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants