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

Fix: yarn start #1814

Merged
merged 2 commits into from
Mar 2, 2021
Merged

Fix: yarn start #1814

merged 2 commits into from
Mar 2, 2021

Conversation

josepot
Copy link
Contributor

@josepot josepot commented Mar 2, 2021

Yesterday I upgraded the dependencies of the "new-client" and I also added a commit for leveraging one of the new utils of @react-rxjs/utils. After each change I made sure that the production build was working properly and I did check whether we were having improvements on the Lighthouse metrics or not, and everything was working fine.

However, a few hours later I got messages from @iprado78 and from Julie letting me know that the yarn start script was no longer working:

image

The error on the image doesn't make any sense, because optional chaining it's in stage-4, it's supported by the current LTS version of node and I don't see any reason why the esm build of a modern library shouldn't be using it these days. Also, this problem only happens on the "dev" build, not on the prod build... So, I was really puzzled about this. First I thought about changing the target of the esm build of react-rxjs to es2019, but that felt wrong. So, after digging into this a lot more I found that this is a long standing issue of CRA: facebook/create-react-app#9468, facebook/create-react-app#9749 .

A work-around is to use the same browserslist for both production and development, which is what this commit does.

@josepot josepot requested review from iprado78 and garyadaptive March 2, 2021 12:11
@garyadaptive
Copy link
Contributor

Can you add a description to this PR explaining the fix please? I'd like to understand the context.

@josepot josepot changed the title Fix/yarn start Fix: yarn start Mar 2, 2021
Copy link
Contributor

@garyadaptive garyadaptive left a comment

Choose a reason for hiding this comment

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

LGTM

@josepot josepot merged commit b2cc27d into AdaptiveConsulting:master Mar 2, 2021
@josepot josepot deleted the fix/yarn-start branch March 2, 2021 12:41
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