mikeric / rivets

Lightweight and powerful data binding.
http://rivetsjs.com
MIT License
3.23k stars 310 forks source link

Uncaught ReferenceError: sightglass is not defined (Electron) #699

Open snify opened 7 years ago

snify commented 7 years ago

I tried to use the latest 0.9.4 from CDN. I use the latest Electron build: electron-v1.4.10-win32-ia32. And every time I get:

Uncaught ReferenceError: sightglass is not defined

Why is this?

blikblum commented 7 years ago

You will need rivets.bundled or add also sightglass

snify commented 7 years ago

I used rivets.bundled.min.js. Tried with sightglass and then rivets and it still shows undefined. I'm not sure where the bug is... maybe it's related to ES2016 support? (Because with nw.js it works) Included in Electron it says 'undefined'

blikblum commented 7 years ago

No idea, whats going on.

You can try this build: https://github.com/blikblum/rivets/tree/svelte/dist

It integrates sightglass into rivets so should not have this problem

Be aware that has some other changes that may fit or not your requirements. You can check them at https://github.com/blikblum/rivets/tree/svelte

snify commented 7 years ago

Somehow it works with your build, but not with the official one. Thanks

P.S. To the author: It would be nice to see what's going on. I can't seem to find the problem.

ghost commented 7 years ago

NOTE: I apologize for the lack of clarity. I came up with a solution to this exact issue 2 months ago and have since forgotten a lot of it.

I had this issue awhile back. I "fixed" it by monkey patching the imports not to do any of the various import/export stuff from commonJS or ES6, and then concatenated them into a vendor.js file that gets placed as a script file within the Githubissues.

  • Githubissues is a development platform for aggregating issues.