-
Notifications
You must be signed in to change notification settings - Fork 903
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
[devops] Consider using Rollup to replace Webpack #741
Comments
@WenheLI - Thanks a bunch for bring this up. Yes! I would love your help with figuring out best practices for devOps. On my devOps agenda:
Happy to hear any suggestions! |
@joeyklee - Great! I will do some experiments with Parcel first! |
@WenheLI @joeyklee switching from webpack would be great. I would suggest using rollup instead of parcel. Parcel is ideal for when you have an actual web application with html/javascript/css and want to have an easy bundler for all of those things. rollup is more ideal for making packages that other can import. It's what tensorflow.js uses for bundling its packages and models. They use parcel for the demo pages. Check out their sample rollup config files: and posenet: |
Also rollup comes with treeshaking, which removes code from the bundles that isn't used. |
Just making a note that i've changed the name of the issue based on Dan's points on Rollup. We should try to go this direction. (aside: Parcel looks awesome for other things! looking forward to trying it) |
Just out of curiosity, what does Rollup add that webpack doesn't have? I don't really think there's much of a value add for that extra work. |
Just an outsiders perspective: I'm spinning up a new project for work and was defaulting to webpack. I'm pausing for a moment to see how rollup and parcel have been coming along after all this time and see what they might bring to the table over webpack and have stumbled across this thread. The only concrete point I see that's been brought up was in regards to the potential bonus of tree shaking. But as @benbot pointed out, webpack already supports. Considering I'm also looking for the potential value-add to justify the cost of deviating (which includes both technical bonuses as well as the churn among other team members), I'll be interested to see what other points others might have to make. |
@david0178418 1 other point i've come across in other work i've been doing is how much simpler rollup is. It's not crazy simple, but it's simpler Still for this project I don't understand the value add of rollup. |
@nsthorat care to chime in on this? |
It's really up to you. I agree rollup is simpler, but much of the world uses webpack and seems to have more documentation / support / examples. At the same time, TensorFlow.js uses rollup right now so you could rip our configurations. FWIW, one day TensorFlow.js will move to webpack. Typically new stuff comes to WebPack faster than rollup, e.g. rollup/rollup#2099. |
Going to close this out for now, as it seems we discussion here has slowed! We can always return to this question in the future, though! |
Currently, the ml5 development process uses
Webpack
as the default building tool which is redundant. It would be better if we can use a relatively easy-to-use development tool like parcel. I have used it for a while and it is easy to set up and use.We may use this thread to discuss the development/building tools as well as other DevOps agendas?
The text was updated successfully, but these errors were encountered: