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

Added custom icon support for adding new and overriding existing icons. #366

Merged
merged 6 commits into from
May 28, 2019

Conversation

alan-cole
Copy link
Collaborator

@alan-cole alan-cole commented May 16, 2019

@tim-yao - This is my take on a custom icon solution. I'll try implement on nuxt and see if I can update the other branch.

@alan-cole alan-cole requested a review from tim-yao May 16, 2019 04:30
@alan-cole alan-cole self-assigned this May 16, 2019
// Add default icons on first call.
// For correct overrides; this must run after custom icons have been added.
if (!hasRunOnce) {
hasRunOnce = true
Copy link
Contributor

Choose a reason for hiding this comment

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

This will make dev mode hot reload not working properly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added ability to invoke a reset to these properties and added it before the first custom library is called. This allows require.context() calls be reset in dev hot reloading.

@@ -0,0 +1,44 @@
const iconProps = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

In dev mode, hot reload will run code multiple times if you edited the config file, so this global var value may will be kept instead of reset to {}.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added ability to invoke a reset to these properties and added it before the first custom library is called. This allows require.context() calls be reset in dev hot reloading.

@alan-cole alan-cole requested a review from tim-yao May 22, 2019 01:53
@tim-yao tim-yao merged commit 2fba620 into master May 28, 2019
@tim-yao tim-yao deleted the feature/custom-svg-support branch May 28, 2019 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants