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

Build-specific babel config files #3911

Merged
merged 7 commits into from
Aug 20, 2020
Merged

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Aug 13, 2020

Summary

Resolves #3801 by reducing the scope of the root .babelrc.js file and creating:

  • scripts/jest/.babelrc.js by extension of root config; no longer does full browser transforms
  • src-docs/.babelrc.js by modification of root config; now the only build that runs react-docgen-typescript

Additional changes:

  • simplified browserslist; removes IE10 & IE11 and a slew of "dead" mobile browsers (see new list)
  • removed docs IE11/ES6 transpilation webpack config
  • reduced the number of files react-docgen-typescript parses by excluding test files

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in Chrome, Safari, Edge, and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation
- [ ] Checked Code Sandbox works for the any docs examples
- [ ] Added or updated jest tests

  • Checked for breaking changes and labeled appropriately

- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3911/

@chandlerprall
Copy link
Contributor

simplified browserslist; removes IE10 & IE11 and a slew of "dead" mobile browsers (see new list)
removed docs IE11/ES6 transpilation webpack config
reduced the number of files react-docgen-typescript parses by excluding test files

Each of those is 🚀

@thompsongl thompsongl marked this pull request as ready for review August 19, 2020 15:55
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3911/

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM

  • ran all unit tests
  • yarn build & spot checked output, confirmed removal of docgen entries (es dir went from 8.1MB->5.9MB, 2.2MB reduction)
  • packed the local build & tested it installed in a CRA app
  • confirmed docgen info is still present & rendered in docs (dev server & docs build)

We should look into tightening the browsers env target to get more modern support like const/let in the output, but that's not blocking for this.

src-docs/.babelrc.js Outdated Show resolved Hide resolved
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3911/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3911/

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.

Create separate babel configurations
3 participants