You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should I include it before require.js? after? how can I require it?
I am having a really hard time including forge as part of my project and require.js is not very helpful when printing the errors.
can someone please point me in the right direction?
EDIT1:
This is for a client-based app and not a nodejs-based server.
EDIT2:
If I modify the forge.min.js file to give a name to the module like: define("js/forge", [], t) it seems to work. I'm testing this atm.
EDIT2:
I had to set it to "/vendor/js/forge.js" so the web workers can load it. This is all very hackish and horrible so I'd like to find a proper solution. It's good enough for the moment because I was tired of spending time fighting the tool rather than solving my actual problem.
The text was updated successfully, but these errors were encountered:
Sorry, we definitely need more documentation in this area. PRs are welcome.
I think most people are using the minified file on its own. It comes with a built-in super-simple AMD loader that mimics require.js called almond. I'm not sure how many people are using forge, in its entirety, in a Web Worker, though it should work. Obviously, it should be more clear how to do it and we should have examples. The include API for Web Workers is also a bit awkward w/respect to path names in general -- so it may be difficult to provide a solution that works across all setups. Again, we'd welcome advice from how people in your situation would prefer it to work and/or PRs to make it happen and keep everything still working in other scenarios.
Note that there's another issue with some plans for getting better built tools into forge in general here: #126. We'd prefer to eventually have a build stack that can support a number of different platforms/use cases more easily.
@dlongley I tried switching to almond but then other plugins were not compatible with the require method (they were passing different arguments to it making it crash).
Should I include it before require.js? after? how can I require it?
I am having a really hard time including forge as part of my project and require.js is not very helpful when printing the errors.
can someone please point me in the right direction?
EDIT1:
This is for a client-based app and not a nodejs-based server.
EDIT2:
If I modify the forge.min.js file to give a name to the module like:
define("js/forge", [], t)
it seems to work. I'm testing this atm.EDIT2:
I had to set it to "/vendor/js/forge.js" so the web workers can load it. This is all very hackish and horrible so I'd like to find a proper solution. It's good enough for the moment because I was tired of spending time fighting the tool rather than solving my actual problem.
The text was updated successfully, but these errors were encountered: