Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set browerslist to 'Chrome 79' #92

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Conversation

reinhard
Copy link
Contributor

By setting the browserlist to 'Chrome 79', Parcel produces Javascript that can be parsed with the Babel version available in CRA 4.0.3. This addresses problems with optional chaining, which is available starting with Chrome 80 (see https://caniuse.com/mdn-javascript_operators_optional_chaining)

See also #72

@vercel
Copy link

vercel bot commented Jan 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-resizable-panels ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 18, 2023 at 5:01PM (UTC)

Copy link
Owner

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks! Spot checking this.

Before this change, this line:

const idBefore: string | null = panelsArray[index]?.id || null;

Ended up in the bundle as:

const idBefore = panelsArray[index]?.id || null;

With this change it becomes:

const idBefore =
  ((_panelsArray_index = panelsArray[index]) === null ||
  _panelsArray_index === void 0
    ? void 0
    : _panelsArray_index.id) || null;

And if we revert 8677dab (on top of this) it becomes:

const idBefore =
  (_panelsArray_index_id =
    (_panelsArray_index = panelsArray[index]) === null ||
    _panelsArray_index === void 0
      ? void 0
      : _panelsArray_index.id) !== null && _panelsArray_index_id !== void 0
    ? _panelsArray_index_id
    : null;

@bvaughn bvaughn merged commit c012080 into bvaughn:main Jan 18, 2023
@bvaughn
Copy link
Owner

bvaughn commented Jan 18, 2023

@reinhard
Copy link
Contributor Author

Thanks for the ultra-fast merge (and the great component).

@reinhard reinhard deleted the fix/parse-error-cra branch January 18, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants