gornostay25 / svelte-adapter-bun

A SvelteKit adapter for Bun
MIT License
537 stars 34 forks source link

workaround for non-configurable props in the polyfill #22

Closed kolchurinvv closed 1 year ago

kolchurinvv commented 1 year ago

after bun hit 0.8.0 running a build and subsequently trying to run bun ./build/index.js resulted in a

➜ bun ./build/index.js
572 | }, globals = {
573 |   File
574 | };
575 | function installPolyfills() {
576 |   for (let name in globals)
577 |     Object.defineProperty(globalThis, name, {
        ^
TypeError: Attempting to change configurable attribute of unconfigurable property.
      at installPolyfills (/Users/vladimir/Dev_Projects/lime812-via-bunx/build/index.js:577:4)
      at /Users/vladimir/Dev_Projects/lime812-via-bunx/build/index.js:587:

i'm adding a check in a polyfill loop to skip any not configurable properties