@@ -92,12 +92,8 @@ function initWorkerThreadsWorker(): typeof WorkerImplementation {
92
92
if ( resolvedScriptPath . match ( / \. t s x ? $ / i) && detectTsNode ( ) ) {
93
93
super ( createTsNodeModule ( resolvedScriptPath ) , { ...options , eval : true } )
94
94
} else if ( resolvedScriptPath . match ( / \. a s a r [ \/ \\ ] / ) ) {
95
- try {
96
- super ( resolvedScriptPath , options )
97
- } catch {
98
- // See <https://github.com/andywer/threads-plugin/issues/17>
99
- super ( resolvedScriptPath . replace ( / \. a s a r ( [ \/ \\ ] ) / , ".asar.unpacked$1" ) , options )
100
- }
95
+ // See <https://github.com/andywer/threads-plugin/issues/17>
96
+ super ( resolvedScriptPath . replace ( / \. a s a r ( [ \/ \\ ] ) / , ".asar.unpacked$1" ) , options )
101
97
} else {
102
98
super ( resolvedScriptPath , options )
103
99
}
@@ -154,12 +150,8 @@ function initTinyWorker(): typeof WorkerImplementation {
154
150
if ( resolvedScriptPath . match ( / \. t s x ? $ / i) && detectTsNode ( ) ) {
155
151
super ( new Function ( createTsNodeModule ( resolveScriptPath ( scriptPath ) ) ) , [ ] , { esm : true } )
156
152
} else if ( resolvedScriptPath . match ( / \. a s a r [ \/ \\ ] / ) ) {
157
- try {
158
- super ( resolvedScriptPath , [ ] , { esm : true } )
159
- } catch {
160
- // See <https://github.com/andywer/threads-plugin/issues/17>
161
- super ( resolvedScriptPath . replace ( / \. a s a r ( [ \/ \\ ] ) / , ".asar.unpacked$1" ) , [ ] , { esm : true } )
162
- }
153
+ // See <https://github.com/andywer/threads-plugin/issues/17>
154
+ super ( resolvedScriptPath . replace ( / \. a s a r ( [ \/ \\ ] ) / , ".asar.unpacked$1" ) , [ ] , { esm : true } )
163
155
} else {
164
156
super ( resolvedScriptPath , [ ] , { esm : true } )
165
157
}
0 commit comments