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

Use a development component instead a build folder #74

Closed
Toledodev opened this issue Jul 7, 2022 · 2 comments
Closed

Use a development component instead a build folder #74

Toledodev opened this issue Jul 7, 2022 · 2 comments

Comments

@Toledodev
Copy link

I'm trying to implement the feature requested by Peerrich in calcom (calcom/cal.com#2939), but as the TimezoneSelect component is imported from the build, it makes it difficult to make some kind of change in the code.
In the example folder (example/src/Timezone.tsx), the TimezoneSelect is imported from dist folder
Screenshot from 2022-07-07 10-39-50

As it is, any changes made to the code will not reflect in the development, when we create a .tsx component for TimezoneSelect instead of importing from the build we will be able to see the changes at the same time as we do

@ndom91
Copy link
Owner

ndom91 commented Jul 8, 2022

Ah yeah, I see what you mean. I always just used it to double check changes worked after build.

I'm testing in the main package.json changing the dev command from:

"dev": "cd example && npm run dev",

to

"dev": "concurrently \"rollup --watch\" \"cd example && npm run dev\"",

That way any changes in the source timezone/component files should be auto rebuilt and then visible in the example without any further major changes.

If yuo have any good ideas to remedy this though, I'm all ears 👍

@ndom91
Copy link
Owner

ndom91 commented Jul 8, 2022

@Toledodev alright awesome, seems to work well. Just pushed to main, if you update your branch you should have an updated dev npm script that should do the trick 👍

@ndom91 ndom91 closed this as completed Jul 8, 2022
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

No branches or pull requests

2 participants