Unverified Commit 7f6b8ac7 authored by Dustin Goodman's avatar Dustin Goodman Committed by GitHub

fix: update with-msw example to function properly for all use cases (#38050)

parent 3ae343fa
if (typeof window === 'undefined') { async function initMocks() {
const { server } = require('./server') if (typeof window === 'undefined') {
server.listen() const { server } = await import('./server')
} else { server.listen()
const { worker } = require('./browser') } else {
worker.start() const { worker } = await import('./browser')
worker.start()
}
} }
initMocks()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment