File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,14 @@ import {
10
10
ThreadsWorkerOptions ,
11
11
WorkerImplementation
12
12
} from "../types/master"
13
+ import { isWebpack , requireFunction , __non_webpack_require__ } from '../webpack-hack'
13
14
14
15
interface WorkerGlobalScope {
15
16
addEventListener ( eventName : string , listener : ( event : Event ) => void ) : void
16
17
postMessage ( message : any , transferables ?: any [ ] ) : void
17
18
removeEventListener ( eventName : string , listener : ( event : Event ) => void ) : void
18
19
}
19
20
20
- // TODO remove webpack hacks. These hurt the performance for non-web-pack situations
21
- // Webpack hack
22
- declare let __non_webpack_require__ : typeof require
23
- const isWebpack = typeof __non_webpack_require__ === "function"
24
- const requireFunction : typeof require = isWebpack ? __non_webpack_require__ : eval ( "require" )
25
21
26
22
declare const self : WorkerGlobalScope
27
23
Original file line number Diff line number Diff line change
1
+ // tslint:disable no-eval
2
+
3
+ // TODO remove webpack hacks. These hurt the performance for non-web-pack situations
4
+ // Webpack hack
5
+ export declare let __non_webpack_require__ : typeof require
6
+ export const isWebpack = typeof __non_webpack_require__ === "function"
7
+ export const requireFunction : typeof require = isWebpack ? __non_webpack_require__ : eval ( "require" )
You can’t perform that action at this time.
0 commit comments