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

Remove dist path from published package #5

Closed
unix opened this issue Apr 27, 2020 · 1 comment · Fixed by #6
Closed

Remove dist path from published package #5

unix opened this issue Apr 27, 2020 · 1 comment · Fixed by #6
Assignees

Comments

@unix
Copy link
Member

unix commented Apr 27, 2020

  1. When the user needs to import a single icon:
// better
import Activity from '@zeit-ui/react-icons/activity'

// now
import Activity from '@zeit-ui/react-icons/dist/activity'
  1. When import all icons, we also need to change the default export name:
// better
import { HomeIcon } from '@zeit-ui/react-icons'

// now
import { Home } from '@zeit-ui/react-icons'

It doesn't look good to add suffixes here, however, use import { Home as HomeIcon } grammar is more annoying. In many projects using material-ui, you can often see a lot of code similar to Home as HomeIcon.

@unix
Copy link
Member Author

unix commented Apr 27, 2020

However, the style of HomeIcon seems a little cumbersome.

@unix unix self-assigned this Apr 27, 2020
@unix unix closed this as completed in #6 Apr 27, 2020
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 a pull request may close this issue.

1 participant