-
Notifications
You must be signed in to change notification settings - Fork 28
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
Won't initialize with webpack. #10
Comments
To be honest I never tested it with CommonJS. Can you point me to a
|
Also, what versions of localforage and cordova/ionic do you use?Thodoris Greasidis |
Hello, Cordova is at version 6.1.1 and localforage is at 1.4.2 now. Currently, I'm using localforage in a separate module and npm installing it within a test app. In the test app, I'm requiring this library at the top of my angular service. require("localforage-cordovasqlitedriver"); I don't really have a boilerplate that I can share that this came from. It's part of a bigger company project, but its a basic angular, webpack and gulp project. I can provide more details because I know this is pretty vague without a test project. Sorry. |
Does your setup look like this? How Cordova SQLite storage plugin Can you provide any info about the execution of the code of this lib?Thodoris Greasidis |
Issue was fixed. It comes from the way webpack is loading the script. It seems localforage-cordovasqlitedriver is not setup fully for CommonJs(?), so I had to update my webpack config to include a script-loader.
Thanks for your help |
Thanks for sharing your findings, this might prove very useful to others. On Mon, May 23, 2016, 17:37 Rich [email protected] wrote:
|
Actually, sqlitePlugin and cordova were both defined at startup. My problem was that cordovaSQLiteDriver was not. |
So these were not
Can you point a specific line in the src that caused an error or at least the error message that you received? PS: thanks for your collaboration so far. I just started a branch using rollup that will hopefully make this lib more webpack friendly. I will keep you posted on that. |
Both sqlitePlugin and cordova were defined. I didn't get an error message at all though. It was like the library didn't get loaded, period, but it was still referenced in the resources as loaded. window.cordovaSQLiteDriver was not there within the conditional. I can look in to it further to get more details on where it dropped off |
Hey there! |
I've been trying to find the sweet spot to require the js file but when I test on a device, The window object doesn't see cordovaSQLiteDriver loaded. Are there any webpack examples of this working?
Any thoughts?
Using:
localforage-cordovaSQLiteDriver v1.3.0
localforage v1.4.0
cordova-sqlite-storage v1.4.1
Thanks
The text was updated successfully, but these errors were encountered: