Workers, webpack and cors

We are switching to webpack 5 and latest cesium and are encountering cors errors with workers now. Apparently inline-ing workers only woks for asm automatically.
Could somebody discuss their approach and or potentially changes to workers in new packaging?