Upgrading babel and rollup to latest #339
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix an issue created by using an old version of rollup.
Some projects assume that their dependencies have the full object prototype available to them. This throws an error when the dependency does not have the Object.Prototype methods on it. In our case this occurs with React when in the bundled code the following happens:
React = React && React.hasOwnProperty('default') ? React['default'] : React
This issue hasn't cropped up as of yet because most people aren't using ES Modules and this bug really only affects ES_Modules or formats that emulate them (like System.register) and ES Modules must not have
Object.prototype
as their prototype (it is expressly forbidden) so the erroneous assumption that rollup made in old versions is that external dependencies (in this case react) had the object prototype necessary to callhasOwnProperty
but anyone using this library and ES (or System.register) modules is guaranteed to have an error because of the specification.Upgrading
Rollup
is all that necessary to fix this issue but I thought it would be helpful to also upgradebabel
for you.Unfortunately there is an issue with the netlify build that makes it appear as though this build is failing when in reality we just need to upgrade to a more modern version of node on the netlify server. The current version that this build is running on (v6) was marked end of life in April of 2019 so we're well past the end of life date. I suggest an upgrade to v10 or v12 (LTS) both of which are supported until April 2021 and April 2022 respectively.
References:
systemjs/systemjs#2147
rollup/rollup#3420
TanStack/table#1995