Skip to content

No support for web worker when using Typescript and Webpack 5? #11651

@rohitisinhk

Description

@rohitisinhk

Describe the bug

Webpack 5 has deprecated 'worker-loader'

When using the suggested webpack 5 compat loader API such as

const worker = new Worker(new URL('./test.worker.ts', import.meta.url));  
worker.postMessage("test");

The CRA loaders @pmmmwh/react-refresh-webpack-plugin and babel-loader fails, and instead it returns with error

'You may need an additional loader to handle the result of these loaders.'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions