Skip to content

Commit

Permalink
Declared variable shouldn't be imported
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 30, 2021
1 parent fcc43da commit 368c149
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/master/implementation.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
ThreadsWorkerOptions,
WorkerImplementation
} from "../types/master"
import { isWebpack, requireFunction, __non_webpack_require__ } from '../webpack-hack'
import { isWebpack, requireFunction } from "../webpack-hack"
export declare const __non_webpack_require__: typeof require

interface WorkerGlobalScope {
addEventListener(eventName: string, listener: (event: Event) => void): void
Expand Down
2 changes: 1 addition & 1 deletion src/webpack-hack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

// TODO remove webpack hacks. These hurt the performance for non-web-pack situations
// Webpack hack
export declare let __non_webpack_require__: typeof require
declare const __non_webpack_require__: typeof require
export const isWebpack = typeof __non_webpack_require__ === "function"
export const requireFunction: typeof require = isWebpack ? __non_webpack_require__ : eval("require")
2 changes: 0 additions & 2 deletions src/worker_threads.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// TODO this file isn't used!

// Webpack hack
import { requireFunction } from './webpack-hack'

Expand Down

0 comments on commit 368c149

Please sign in to comment.