Too Long; Didn't Read
React is distributed as UMD, it cannot be consumed by imports, even by the shimmed ones. We need to somehow patch the distributable to convince browser that it's a legit ES modules. We can use Service Workers to intercept and pre-process network requests. We've used the same approach to intercept the network requests and respond with slightly different content, in this case we use the. response response to the request and respond. to the network request and. respond to slightly different. content. There are two ways to do the.X compilation. and use Babel to pre-compile. or we can. use Service Worker.