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

Console warnings are not being transpiled for the dist #902

Closed
samboylett opened this issue Jul 5, 2019 · 0 comments · Fixed by #983
Closed

Console warnings are not being transpiled for the dist #902

samboylett opened this issue Jul 5, 2019 · 0 comments · Fixed by #983
Milestone

Comments

@samboylett
Copy link

samboylett commented Jul 5, 2019

Describe the bug

Useful console messages are not being transpiled into the dist, e.g.:
https://github.com/sagalbot/vue-select/blob/master/src/components/Select.vue#L245

To Reproduce
Steps to reproduce the behavior:

  1. Go to the repo
  2. run yarn
  3. run yarn build
  4. Search dist/vue-select.js for console

Expected behavior
Don't minify/remove the console functions in the distribution code (this can be handled by peoples app build anyway). Or throw an error instead.

Additional context
So I found this issue as I have options set to an array of objects and am rendering the label using the slot instead of the prop. Issue is when trying to select a different option, it uses isOptionSelected/optionComparator to compare the objects, but getOptionLabel was returning undefined. I don't really consider this to be the bug as I was missing config, but having the console.warn would have really helped me to debug this. This is definitely a weird edge case / gotcha that should be considered though.

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.

2 participants