Second argument of postMessage is not a transfert list
See original GitHub issueDo you want to request a feature or report a bug?
A bug.
What is the current behavior?
There is an error (only in webpack-dev-server, not in regular webpack builds) in the console when there is a target “webworker”.
Chrome error:
Uncaught TypeError: Failed to execute ‘postMessage’ on ‘DedicatedWorkerGlobalScope’: The 2nd argument is neither an array, nor does it have indexed properties.
Firefox error:
TypeError: Argument 2 of DedicatedWorkerGlobalScope.postMessage can’t be converted to a sequence.
If the current behavior is a bug, please provide the steps to reproduce.
Testcase to reproduce it: https://github.com/wildpeaks/issue-webpack-dev-server-postmessage
They seem to point to this line as it appears "*" is not a valid transfert list.
What is the expected behavior?
The expected behavior is no error shown in the console.
Please mention your webpack and Operating System version.
- Node 7.4.0
- Windows 10
- Webpack 2.2.0-rc.7
- Webpack-dev-server 2.2.0-rc.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)

Top Related StackOverflow Question
@SEAPUNK a temporary workaround for typescript is to reassign the
postMessagemethod to another and use that. e.g. below@hccde Thump up tp @SEAPUNK for the workaround, but yes absolutley its not working. It might be a typescript issue. I am not sure yet if its a web-pack issue, but to repro I used the below example and ran it in Angular project, which is using web-pack and it failed with the same issue https://github.com/zlepper/typescript-webworker