-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: vite for kv-components #507
Conversation
What creates the need to have a folder and additional index for every component? Is there a way around that? I can see the usefulness of synchronizing within this repo with or without the We could also look at using an alias in vite to resolve without a relative path...something like |
This structure is from a guide for component libraries I was following. Each index is an entry point for the library. It allows individual fully-built components to be used without depending on the rest of the library and without needing an additional build step. We can also use those individual index files to inject type definitions, if/when we add typescript to this. If we use just the top-level index file, we might not get tree-shaking with the output and it might be harder to add type definitions. I'm still testing the consumer side of this setup, and I'll change it if I can.
Yeah, that's a good idea. I probably should have started with that. Find & replace will make easy work of it at least |
060af25
to
b50959e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! And relatively few actual code changes!
…e storybook BREAKING CHANGE: dist folder structure is different, so existing import statements will not work
…A-137 BREAKING CHANGE: country name must be provided to KvFlag
BREAKING CHANGE: components exported at vue/* to match source path
BREAKING CHANGE: modules now use import/export and .js extensions
…adline Date prop BREAKING CHANGE: msLeft Number prop replaced with deadline Date prop
…per & embla carousel
f088cbd
to
bc1e86f
Compare
Started doing this so that KvFlag and the flag svgs could be transpiled in the library, avoiding the need for UI, CPS, or other apps to handle it.
Most notable changes are
import { KvMap } from '@kiva/kv-components';
orimport KvMap from '@kiva/kv-components/vue/KvMap';
orimport KvMap from '@kiva/kv-components/vue/KvMap.js';
src
directory