fe6df38997
* fix: Revert "fix: Revert "build: upgrade to webpack 5 (#6459)" (#6566)" This reverts commit 5e591455b38c9618c750a23bc2a63cdcc30dba57. * build: polyfill Buffer * docs: fix comment negation
24 lines
436 B
TypeScript
24 lines
436 B
TypeScript
import 'polyfill-object.fromentries'
|
|
|
|
import { ResizeObserver } from '@juggle/resize-observer'
|
|
import flat from 'array.prototype.flat'
|
|
import flatMap from 'array.prototype.flatmap'
|
|
import { Buffer } from 'buffer'
|
|
|
|
flat.shim()
|
|
flatMap.shim()
|
|
|
|
declare global {
|
|
interface Window {
|
|
Buffer: typeof Buffer
|
|
}
|
|
}
|
|
|
|
if (!window.Buffer) {
|
|
window.Buffer = Buffer
|
|
}
|
|
|
|
if (!window.ResizeObserver) {
|
|
window.ResizeObserver = ResizeObserver
|
|
}
|