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
Transition from Watchify to Webpack #757
Comments
@DaleMcGrew Where did you see that this was a mac specific issue? |
Useful posts I found (I did not do extensive digging): I saw a couple of posts that recommended passing in the ", { poll: true }" option. |
@DaleMcGrew Thanks! I'll check it out. |
@DaleMcGrew I think I fixed it- pls see Pr |
@DaleMcGrew Can we close this? I think integration of my last PR fixed this, no? |
Hello @Anoninnyc, the PR you submitted to fix this did not work. I would recommend we pass this to a developer using a Mac so it can be tested locally. Thank you for your work so far on this! |
@DaleMcGrew Do you think this X-machine compatibility issue could be solved by Docker? Just putting it out there (never used Docker myself, and maybe it would be overkill if only using to solve this one issue). |
Hi @Anoninnyc, you are welcome to try Docker. We discovered that the watchify/browserify problem we saw on Mac also existed for our Linux developers. |
@DaleMcGrew Long time no talk in this project for myself. I am wondering why there was the introduction of watchify? Would help to put into context the exact use case of the need for it in this project. |
Great to hear from you Rob @pertrai1 ! I just updated the description with more details: "We introduced Watchify in order to cut down the built time from ~30 seconds to ~4 seconds. This made the iterations much quicker, which was a benefit to developers. But we had to remove the watchify module because since introduction of watchify module, ~ every other time a change is saved, its omitted in hot-reloaded version of app." |
@DaleMcGrew might be time to change over to Webpack. |
Hello @bharathdn and @kuwood, do you have time to collaborate on this upgrade this week? |
are you guys switching over the entire build to webpack? |
Closed until we can return to this. |
We started investigating this issue again to speed up the build process and we looked into Webpack and Parcel. Here is the comparison: We'd like to recommend Parcel because of the ease of use with the caveat that it's less mature and therefore may not support certain unique customization. @DaleMcGrew Does the team have a preference of Webpack or Parcel? We can start working on this issue. |
Thank you @user512! My biggest concern about Parcel is that it doesn't seem to end up with a single bundle file (which our deployment is set up around). If I am mistaken, and Parcel can bundle into a single file, that would be interesting. Otherwise my preference would be Webpack 4. |
Wow Parcel sounds amazing. It has 29,000 stars and 43,000 downloads a week on npm. (vs 6M/week for webpack) I used Webpack a few years ago and it was both great and tragic, but a few years of improvement could mean a world of difference. Gulp is slow and kind of dumb, few of those 30 seconds add any value. I'd lean toward trying Parcel - Could it be added in parallel with our existing gulp setup, so we could use both for a while? |
That's an interesting idea @SailingSteve to try to run both gulp and parcel in parallel. We can investigate that. Based on this article, it looks the code splitting feature where Parcel splits the output into multiple bundles can be triggered by using the import() command as follows:
When Parcel sees the promise structure it knows that it's possible to split up the bundle into multiple files which can be loaded at different times. If my understanding is correct, as long as we do not use the important().then() promise structure, then Parcel will not split the output, and it will end up as a single bundle. @DaleMcGrew do you think this would satisfy your concern around the bundle splitting? |
Parcel is pretty easy to get going for a new project, but the startup fails when it gets to our scss files. It seems that node-sass doesn't handle concurrent threads well (deep in its 'c' implementation), and Parcel gets much of its boost by using multiple cores simultaneously. The Parcel team recommends going with 'dart-sass'.. our sass implementation would need to be reworked. Dart-sass has you import the sass files into the pages where they are used, which is some work, but hopefully that would avoid our current issue where all sass styles are global. |
Hello @utsab and @SailingSteve would you be able to work together to get to a new version of the Webpack bundle generator? Steve would like to use a new PDF display package that requires webpack. |
Hi @DaleMcGrew, I will follow up with @SailingSteve. Making the new webpack bundle generator work with Cordova has been a challenge so far. I have been meaning to reach out to Steve in any case to get his insight on this. |
Hi @utsab, thank you for the update. You might want to create a WebApp pull request (merged with all of the most recent changes) that @SailingSteve can review prior to your conversation. |
@SailingSteve I believe the the new webpack work is ready to be tested in Cordova. Would you be up for testing it on your side and giving us your feedback? We successfully launched the app in Cordova (using the webpack generated bundle.js) following the Xcode ios instructions, and the app correctly ran in ios simulator. Here are the instructions you can follow for running the app locally in Xcode:
This should generate a new bundle.js inside the build directory.
Note that you should not attempt to recreate these symlinks, because the corresponding directories in WebApp no longer exist.
|
It is my pleasure to mark this Issue as fully resolved and running on our live production servers. Many thanks to @user512, @utsab and @SailingSteve for making this transition happen. This new Webpack build system significantly increases development speed. Thank you! |
Please describe the issue (What happens? What do you expect?)
We introduced Watchify in order to cut down the built time from ~30 seconds to ~4 seconds. This made the iterations much quicker, which was a benefit to developers. But we had to remove the watchify module because since introduction of watchify module, ~ every other time a change is saved, its omitted in hot-reloaded version of app.
Steps to reproduce the problem (1, 2, 3...), including links
1.Make a change. hit save. wait for page to reload.
2. repeat
(notice when you're changes are and are not reflected on screen)
The text was updated successfully, but these errors were encountered: