88ed5269b5
Updates the hotUpdateChunk to include `[runtime]` for web workers support. Fixes #26152 Fixes #19865 Fixes #26144 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
export function Expensive() {
|
|
const start = performance.now()
|
|
let i = 99999
|
|
|
|
const bigArray = []
|
|
while (--i) {
|
|
bigArray.push(i)
|
|
}
|
|
|
|
const endTime = performance.now()
|
|
|
|
if (typeof window === 'undefined') {
|
|
console.log('[WORKER] Completed expensive function in', endTime - start)
|
|
} else {
|
|
console.log('[WEB] Completed expensive function in', endTime - start)
|
|
}
|
|
}
|