psayre23 / WebSQL

A WebSQL library for easier local database queries
MIT License
90 stars 21 forks source link

Import in Vue project #5

Open sweebee opened 6 years ago

sweebee commented 6 years ago

I'm using the library for a while now in some simple JS projects, But I want to include it into my Vue project. Is there a way to do this? Can't get it working this way:

import * as WebSQL from './WebSQL';
var db = WebSQL('test');

Object.defineProperty(Vue.prototype, '$db', { value: db });

I keep getting: Can't find variable: WebSQL (WebSQL.js:429)

psayre23 commented 6 years ago

This project is pretty old at this point. If you'd like to send a pull request, I'd gladly accept.