Skip to content
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

Using your tutorial boilerplate with webworkers? #393

Open
rjb25 opened this issue Feb 18, 2017 · 0 comments
Open

Using your tutorial boilerplate with webworkers? #393

rjb25 opened this issue Feb 18, 2017 · 0 comments

Comments

@rjb25
Copy link

rjb25 commented Feb 18, 2017

I have been running on a boilerplate from your tutorials. I recently ran into a problem when trying to use a web worker library due to main.js not being executable by a web worker. main.js looks like:

var CLOSURE_UNCOMPILED_DEFINES = null;
if(typeof goog == "undefined") document.write('<script src="js/main.out/goog/base.js"></script>');
document.write('<script src="js/main.out/cljs_deps.js"></script>');
document.write('<script>if (typeof goog != "undefined") { goog.require("boot.cljs.main8234"); } else { console.warn("ClojureScript could not load :main, did you forget to specify :asset-path?"); };</script>');

Notice that it writes the dependencies to the page. A web worker cannot use this because it needs a single file that contains all of its execution data. Typically this would be the main.js file.

I could use an alternative file that uses importScripts(); alongside goog.require. I am not sure what scripts to import though and in what order. Possibly there is another js file that might do what I am looking for? Any questions of further details you might want please ask.

TLDR; Trying to get your tutorial boilerplate to work with servant web worker library but your main.js file does not work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant