Skip to content

Instantly share code, notes, and snippets.

@akfish
Created July 27, 2014 08:44
Show Gist options
  • Save akfish/d2e198b1341e17310aad to your computer and use it in GitHub Desktop.
Save akfish/d2e198b1341e17310aad to your computer and use it in GitHub Desktop.
Sea.js worker support concept

Manually

Module

# foo.coffee
# This module can be required in both browser and worker 
define (require, exports, module) ->
  bar = require 'bar'
  
  # Do stuff
# worker.coffee
importScripts('sea.js')

seajs.use("foo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment