mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Require config when task shell starts
Config adds to the require paths so it needs to be required before the handler starts so that web worker handlers have the same require semantics as the main window.
This commit is contained in:
@@ -20,8 +20,10 @@ self.callTaskMethod = (method, args...) ->
|
||||
# The worker's initial handler replaces itself when `start` is invoked
|
||||
self.handler =
|
||||
start: ({resourcePath, requirePath, handlerPath}) ->
|
||||
self.resourcePath = resourcePath
|
||||
window.resourcePath = resourcePath
|
||||
importScripts(requirePath)
|
||||
require 'config'
|
||||
self.handler = require(handlerPath)
|
||||
callTaskMethod 'started'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user