You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parcel has a runtime error even though I build fine. This only happens after adding the tldraw library.
Uncaught TypeError: Cannot read properties of undefined (reading 'key')
at W (index.9f8f1ec8.js:sourcemap:91:58393) at Array.forEach (<anonymous>)
at c (index.9f8f1ec8.js:sourcemap:91:45866) at Object.<anonymous> (index.9f8f1ec8.js:sourcemap:91:43275)
at 1 (react.22dff9ba.js:sourcemap:1:402) at Object.<anonymous> (index.9f8f1ec8.js:sourcemap:91:20307)
at 1 (react.22dff9ba.js:sourcemap:1:402) at Object.<anonymous> (index.9f8f1ec8.js:sourcemap:91:4150)
at 1 (react.22dff9ba.js:sourcemap:1:402) at Object.<anonymous> (index.9f8f1ec8.js:sourcemap:85:2988)
So a workaround I have found is to add the --no-scope-hoist to the yarn build and it works. So basically if we bypass the tree-shaking, it works, so there must be some bug in the tree-shaking logic.
🔦 Context
I am not able to render the UI with this bug. As soon as I add https://www.npmjs.com/package/tldraw to my project, it creates this problem, so perhaps there is some dependency in there that is causing the tree-shaking algorithm in parcel some issues.
If we don't have tree-shaking, it makes the bundle go from 50 kB to 2.5 MB!
manewman@Matts-MacBook-Pro athena % yarn size
yarn run v1.22.22
$ size-limit
Package size limit has exceeded by 2.42 MB
Size limit: 100 kB
Size: 2.52 MB brotlied
🐛 bug report
Parcel has a runtime error even though I build fine. This only happens after adding the tldraw library.
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
It should render the page properly
😯 Current Behavior
That error is thrown and it doesn't render the UI
💁 Possible Solution
So a workaround I have found is to add the --no-scope-hoist to the yarn build and it works. So basically if we bypass the tree-shaking, it works, so there must be some bug in the tree-shaking logic.
🔦 Context
I am not able to render the UI with this bug. As soon as I add https://www.npmjs.com/package/tldraw to my project, it creates this problem, so perhaps there is some dependency in there that is causing the tree-shaking algorithm in parcel some issues.
If we don't have tree-shaking, it makes the bundle go from 50 kB to 2.5 MB!
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: