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

Don't export TS types from JS files #4597

Merged
merged 2 commits into from
Mar 2, 2021

Conversation

chandlerprall
Copy link
Contributor

Summary

Fixes #4595 by removing EuiPageSideBarProps and EuiPageTemplateProps exports from src/components/index.js as they are TypeScript definitions and removed from the transpiled code.

I confirmed with BABEL_MODULES=false yarn webpack --config=src/webpack.config.js that these are the only two such exports.

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

🙇‍♀️ Thank you!

@chandlerprall chandlerprall merged commit 9c6dea9 into elastic:master Mar 2, 2021
@chandlerprall chandlerprall deleted the bug/4595-exported-types branch March 2, 2021 22:55
@orhantoy
Copy link

orhantoy commented Mar 2, 2021

There's something similar here (EuiSideNavProps):

export { EuiSideNav, EuiSideNavProps } from './side_nav';

@kibanamachine
Copy link

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

@chandlerprall
Copy link
Contributor Author

Thanks @orhantoy ; I'll remove it as well, and am looking into why webpack warned/failed on the other 2 exported types but not EuiSideNavProps. Is this one causing a build failure for you?

@orhantoy
Copy link

orhantoy commented Mar 3, 2021

@chandlerprall No build failure, just mentioning it here because I also ran into the issue with EuiPageSideBarProps, and while investigating I noticed EuiSideNavProps.

@chandlerprall
Copy link
Contributor Author

why webpack warned/failed on the other 2 exported types but not EuiSideNavProps

side_nav/index.ts exports * from whereas page/index.ts has explicit exports, looks like webpack only inspects one layer deep when issuing that warning.

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.

EUI 31.9.0 upgrade error
4 participants