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 'TypeError: _browserslist.findConfigFile is not a function' #1346

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nifgraup
Copy link

What:

I remove browserslist override which was causing errors on: npm run setup -s

Why:

Have to build.

How:

removed pin in package.json

Checklist:

  • N/A [ ] Documentation added to the
    docs site
  • N/A [ ] Tests
  • N/A [ ] TypeScript definitions updated
  • [ x] Ready to be merged

Copy link

codesandbox-ci bot commented Jan 15, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 31b37f4:

Sandbox Source
react-testing-library-examples Configuration

@eps1lon
Copy link
Member

eps1lon commented Jan 15, 2025

Have you checked why we added this? It used to ensure we always target the same syntax level. Changing it randomly on publish is unsafe since we might produce syntax that's only valid for newer Node.js/Browser versions i.e. a breaking change.

@nifgraup
Copy link
Author

nifgraup commented Jan 15, 2025

It was originally added in #1169 to avoid parsing error by Acorn < 7.3.0 (the Acorn JS parser is used by Webpack). Since then Node.js 12 has been dropped #1207 which similarly does not support Nullish coalescing like Acorn < 7.3.0.

I myself do similar thing as the reporter in #1169, use webpack to bundle the tests and run them in a browser. That webpack configuration sets the target of browsers to run the tests in.

Is webpack 4 (Acorn 6) within the support matrix?

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