File tree 1 file changed +6
-5
lines changed 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ function workerSetup() {
11
11
p = Promise . reject ( 'No such method' ) ;
12
12
}
13
13
p . then ( result => {
14
- postMessage ( { type : 'RPC' , id, result } ) ;
15
- } )
14
+ postMessage ( { type : 'RPC' , id, result } ) ;
15
+ } )
16
16
. catch ( e => {
17
- let error = { message : e } ;
17
+ let error = { message : e } ;
18
18
if ( e . stack ) {
19
19
error . message = e . message ;
20
20
error . stack = e . stack ;
@@ -29,6 +29,7 @@ function workerSetup() {
29
29
30
30
const workerScript = '\n' + Function . prototype . toString . call ( workerSetup ) . replace ( / ( ^ .* \{ | \} .* $ | \n \s * ) / g, '' ) ;
31
31
32
- export default function rpcWorkerLoader ( content ) {
33
- return content + workerScript ;
32
+ export default function rpcWorkerLoader ( content , sourceMap ) {
33
+ const callback = this . async ( ) ;
34
+ callback ( null , content + workerScript , sourceMap ) ;
34
35
}
You can’t perform that action at this time.
0 commit comments