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

Generated worker blob includes main dependency graph #12

Closed
timkurvers opened this issue Aug 2, 2015 · 4 comments
Closed

Generated worker blob includes main dependency graph #12

timkurvers opened this issue Aug 2, 2015 · 4 comments

Comments

@timkurvers
Copy link

The sample main/worker setup from the README includes webworkify in the worker blob, even though it's not required from the worker.

In the application I'm currently working on this results in a blob of approximately 1.1MB, for the following worker, due to the sheer size of the rest of the bundle:

module.exports = function(self) {
  console.log('hello world!');
};

The culprit seems to be usage of Object.keys(sources) which will include all sources up to that point.

Is this by design?

@kumavis
Copy link

kumavis commented Aug 5, 2015

I had this problem and ended up writing https://github.com/kumavis/meowserify
however, its not very good, could be improved greatly.

@kumavis
Copy link

kumavis commented Nov 3, 2015

@timkurvers ever come up with a clever solution here?

@timkurvers
Copy link
Author

@kumavis Not really unfortunately. I ended up building a separate worker-bundle using browserify.

@mourner
Copy link
Collaborator

mourner commented Sep 7, 2016

Check out #30 for a solution.

jfirebaugh added a commit to mapbox/mapbox-gl-js that referenced this issue Sep 7, 2016
mourner pushed a commit to mapbox/mapbox-gl-js that referenced this issue Sep 7, 2016
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

3 participants