SeregPie / VuetifyImageInput

Provides basic image editing tools.
https://seregpie.github.io/VuetifyImageInput/
MIT License
131 stars 36 forks source link

Node gives error btoa is not defined #38

Open ehudettun opened 3 years ago

ehudettun commented 3 years ago

Solved by replacing in index.js:

[url('data:image/svg+xml;base64,${btoa('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2" fill-opacity="0.2"><rect x="1" width="1" height="1"/><rect y="1" width="1" height="1"/></svg>')'),"center center / 16px 16px","repeat","#fff"]

to

[url('data:image/svg+xml;base64,${Buffer.from('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2" fill-opacity="0.2"><rect x="1" width="1" height="1"/><rect y="1" width="1" height="1"/></svg>').toString()}'),"center center / 16px 16px","repeat","#fff"]

Hope that helps anyone